TIEHashStream.DecryptString
Declaration
function DecryptString(const TextBase64, Password: AnsiString): String;
Description
Decrypt a Base64 encoded string with the given password.
Note:
◼Generally an exception is not raised if the specified password is incorrect (except in the case below). So you should use a different method to validate the data
◼An exception will be raised if the data returned by decryption cannot be mapped to a unicode string (e.g. if due to a bad password the returned data is corrupted)
var
hs: TIEHashStream;
begin
hs := TIEHashStream.Create( iehaSHA256, False );
try
Text := hs.DecryptString( EncryptedText, 'My Password' );
finally
hs.Free();
end;
end;
See Also
◼IEDecryptString
◼EncryptString
◼Encrypt
◼Decrypt