Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us
/img/help/home.gif /img/help/prev.gif /img/help/disnext.gif


Encrypting a string



With Easy Compression Library you can easily encrypt and decrypt a string.


Encrypting a string.

To encrypt a string you need to call ECLCompressAndEncryptString function.

The Password parameter must be not blank.


Decrypting a string.

To decrypt a string you need to call ECLDecompressAndDecryptString.



Set bHexFormat parameter of ECLCompressAndEncryptString to True if you plan to access encrypted string as null-terminated string (PChar). This is required if you store encrypted password to Registry for example.

By default encrypted string can contain some CHR(0) entrances and accessing the string with PChar() will not be correct.




EncryptStr, DecryptStr: string;


{ encrypt a string }

ECLCompressAndEncryptString('test', EncryptStr, 'Password', ppmFastest);

{ decrypt a string }

ECLDecompressAndDecryptString(EncryptStr, DecryptStr, 'Password');

{ show decrypted string }






        © 2003 - 2018 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Mar 21, 2018