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

 

ECLCompressAndEncryptString

 


 

Compresses and/or encrypts a string.

 

Unit

 

EasyCompression

 

function ECLCompressAndEncryptString(InStr: String; out OutStr: String; Password: String = ''; CompressionLevel: TECLCompressionLevel = DefaultCompressionLevel; bNoCRC: Boolean = True; bHexFormat: Boolean = False: Boolean;

 

Description

Call ECLCompressAndEncryptString to compress and/or encrypt a string.

This function returns True if the compression and/or encryption completed without errors or False if any error occurred.

InStr represents the source string.

OutStr contains the result string with compressed and/or encrypted data.

If Password is not blank, it is used to encrypt the data.

CompressionLevel specifies the level of compression to be used.

bNoCRC specifies whether CRC-32 will be added to compressed data to be used for verification while decompressing.

bHexFormat specifies whether result string is converted to HEX format.

 

Warning:

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

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

 

        © 2003 - 2024 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Nov 21, 2024