Back to product page
Mode property
Determines the encryption mode.
Type
A CryptoModes enumeration. Specifies if chaining of data blocks is performed during encryption/decryption.Syntax
- Basic
object.Mode [= value]
The Mode(object,value) syntax has these parts:
The Mode(object,value) syntax has these parts:
object | An expression evaluating to an object of type wodCrypt. |
value | A CryptoModes enumeration, as described in settings. |
Remarks
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 |
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.