Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component

Index of Chilkat Blog Posts

November 26, 2007

NULL Characters in Encrypted Data?

Does the output of an encryption algorithm produce NULL characters (i.e. bytes having a 0 value)?
I need to know because I wish to save the encrypted output to a database as a string.

All encryption algorithms produce binary output. All byte values (0-255) may be present in the encrypted output. Encrypted data has the same properties as random bytes (which is why it does not compress well — there are no recurring patterns necessary for lossless compression).

Chilkat provides methods for returning encrypted data as an encoded string (using us-ascii characters). Encryption methods ending in "ENC" return the binary encrypted data as an encoded string: EncryptBytesENC and EncryptStringENC. The EncodingMode property can be set to control the encoding of the output. EncodingMode is a string property and may be set to: "hex", "base64″, "url", or "quoted-printable".

Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.