Class: ECB

ECB

Implements ECB block cipher mode. Used internally during symmetric *cryption.

new ECB(data)

Creates a new ECB block cipher mode instance
Parameters:
Name Type Description
data Object Initialization options for the class, passed automatically into ECB#initialize
Source:

Extends

Requires

  • module:convert

Methods

decrypt_blocks(words) → {Array}

Decrypt blocks.
Parameters:
Name Type Description
words Array An array of 32-bit words whose length must be an integer multiple of ECB#get_words_per_block
Source:
Returns:
Decrypted blocks
Type
Array

encrypt_blocks(words) → {Array}

Encrypts blocks.
Parameters:
Name Type Description
words Array An array of 32-bit words whose length must be an integer multiple of ECB#get_words_per_block
Source:
Returns:
Encrypted blocks
Type
Array

get_words_per_block() → {number}

Convenience function to get the number of 32-bit words required for each block
Inherited From:
Source:
Returns:
Type
number

initialize(data) → {ECB}

Called automatically on class instantiation. Invokes BlockCipherMode#initialize.
Parameters:
Name Type Description
data Object See BlockCipherMode#initialize for a list of supported properties.
Source:
Returns:
Type
ECB