Encrypt(passPhrase: String; clearText: String): String;
passPhrase. Secret phrase used on text encryption.
clearText. Text to be encrypted.
The Encrypt method encrypts the specified text and returns the obtained result.
Add a link to the Metabase system assembly.
Sub UserProc(Pass: String; Text: String);
Var
Crypt: ICryptoPackage;
Res: String;
Begin
Crypt := New CryptoPackage.Create;
Res := Crypt.Encrypt(Pass, Text);
Debug.WriteLine("Encryption result: " + Res);
Res := Crypt.Decrypt(Pass, Res);
Debug.WriteLine("Decryption result: " + Res);
End Sub UserProc;
The specified executes encrypts and then decrypts text. Source text and secret phrase are sent as input parameters. Encryption and decryption results are displayed in the development environment console.
See also: