Declaration
function IEEncryptString(const S, Password: String; Algorithm: TIEHashAlgorithm): String;
Description
Encrypt a string using a standard algorithm: MD2, MD4, MD5, SHA1, SHA256, SHA384 or SHA512.
It will be returned as Base64 encoded.
Use
IEDecryptString to decrypt the string.
Note: Unicode text is supported
var
InText, EncText, OutText, PW: string;
begin
PW := 'This is my Password';
InText := 'This is a test!';
// Encrypt text using SHA256
EncText := IEEncryptString( InText, PW, iehaSHA256 );
Memo1.Lines.Add( '"' + EncText + '"' );
// Decrypt text using SHA256
OutText := IEDecryptString( EncText, PW, iehaSHA256 );
Memo1.Lines.Add( '"' + OutText + '"' );
end;
See Also
◼IEDecryptString
◼EncryptString
◼TIEHashStream