wodCrypt ActiveX Control - Mode Property
      
 

Description

Determines the encryption mode.


Property type

A CryptoModes enumeration.  Specifies if chaining of data blocks is performed during encryption/decryption.


Syntax

object.Mode [= value]



The Mode Property syntax has these parts:

Part Description
object An expression evaluating to an object of type wodCrypt.
value A CryptoModes enumeration, as described in settings.

Settings

The settings for value are:

Constant Value Description
 ECB 0 Electronic CodeBook Mode
 CBC 1 Cipher Block Chaining Mode
 CFB 2 Cipher FeedBack Mode
 OFB 3 Output FeedBack Mode

Remarks

The Mode property defines how different input (plaintext) blocks of data are 'chained' to each other during encryption. The default value, ECB, does not chain data in any way - blocks are encrypted individually, and the same input blocks result in equal outgoing blocks.

In CBC, CFB and OFB modes, each block is XOR-ed with the value of InitVector at some point, and InitVector is changed on each iteration. This way resulting data is different even if the input blocks are the same. The most common mode is CBC.

You must specify the same Mode when you try to Decrypt the data.