Xceed Encryption Library Documentation
EncryptionMode property
Xceed Encryption control reference > Encryption Method objects > XceedRijndaelEncryptionMethod object > EncryptionMode property

Description

The EncryptionMode property allows you to specify what type extra processing to apply to each plain text block before it is encrypted by a secret-key encryption algorithm, or what type of extra processing to apply to each encrypted data block after it has been decrypted by a secret-key encryption algorithm.

Data type

EXEEncryptionMode

Possible values
 

Value Description
emoFreeBlocks  Does not apply any extra processing to each block. Also known as the Electronic Code Book (ECB) encryption mode. Data encrypted in this mode will always be identical each time it is encrypted
emoChainedBlocks  Before each plain text block is encrypted, or after each encrypted data block is decrypted, it is XORed with the previous block's encrypted data. This mode is also known as the Cipher Block Chaining (CBC) encryption mode.

When encrypting data in this mode, the first block the encryption engine will output is an unencrypted block known as the initialization vector , which usually consists of random bits but can be explicitly specified by setting the InitVector property. The initialization vector block is XORed with the first block of plain text before it is encrypted, and then this new encrypted block is outputted and then XORed with the next block of plain text before it is encrypted, and so on. Thus, the same plain text encrypted twice with the same key will produce different encrypted data, which helps prevent certain types of crypto-attacks.

If it is acceptable to add 16 bytes per encrypted message then this encryption mode is recommended.

Default value

emoFreeBlocks

Remarks

This property cannot be set during the encryption or decryption process.

Applicable methods

Encrypt, Decrypt, ReadFile, WriteFile and ProcessFile