#1 2014-11-13 08:10:06

nirnir
Member
Registered: 2013-11-11
Posts: 66

encrypt/decrypt string example

Hi ,
Do you have a simple example of how doing  that ?

Offline

#2 2014-11-13 08:33:00

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: encrypt/decrypt string example

With which encryption mode? Do you need key hashing?

Just take a look at the functions available in SynCrypto.pas.
See http://synopse.info/files/html/api-1.18/SynCrypto.html

Take a look at this one:

/// AES encryption using the TAES format with a supplied SHA256 password
// - last bytes (not part of 16 bytes blocks) are not crypted by AES, but with XOR
function  AESSHA256(const s, Password: RawByteString; Encrypt: boolean): RawByteString; overload;

Offline

#3 2014-11-14 10:55:54

nirnir
Member
Registered: 2013-11-11
Posts: 66

Re: encrypt/decrypt string example

Thanks

Offline

Board footer

Powered by FluxBB