Choosing Binary or Base64 for Encryption Output

Binary Encoded File

A binary file is a computer file that is not a text file. It may contain any type of data, encoded in binary format for computer storage and processing purposes.

Binary files are considered to be a sequence of bytes. The bytes are interpreted as something other than text characters.

Base64 Text

Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. The term Base64 originates from a specific MIME content transfer encoding.

Base64 encoding schemes are commonly used when there is a need to encode binary data that needs to be stored and transferred over media that is designed to deal with textual data. This is to ensure that the data remains intact without modification during transport. Base64 is commonly used in a number of applications including email via MIME, and storing complex data in XML.

 

Encoding Scheme

Highlights

Binary

  • Fastest method.
  • Single encryption or decryption step required.
  • Not available when pfEncryptor is encrypting or decrypting strings.

Base64 Text

  • Slower than binary
  • Requires extra step to convert binary data to Base64 Text format.
  • May be required by certain transfer media.
  • Can be used by pfEncryptor when encrypting or decrypting either strings or files.
  • Can cause Out of Memory exceptions when very large amounts of data are encoded to Base64 (e.g. hundreds of megabytes or more).

 

See Encryption Algorithms for a description of the encryption standards used by this application.