Archived Forum Post

Index of archived forum posts


How to Encrypt and Decrypt Strings ENTERED BY THE USER, using RSA C++ Methods

Feb 18 '13 at 08:05

Hi,, i've been trying to use the encryption and decryption methods of RSA (in C++ Builder XE3) to encrypt and decrypt strings entered by the user, but the methods only work on constant strings, i've tried to do the following:

void __fastcall TForm1::Button1Click(TObject *Sender) {String mn= Edit1->Text; EncryptDecryptString(mn);}

void EncryptDecryptString(String mn) { ..... const char * plainText= AnsiString(mn).c_str(); .....} But still, it doesn't work! Need help please :)


There is not enough information here to understand the cause of the problem. To get a better response, the problem needs to be communicated in a better way.