Class: BlockCipherMode

BlockCipherMode

Abstract class which provides base functionality for block cipher mode operator subclasses

<virtual> new BlockCipherMode()

NOTE: you can't instantiate this class directly. Instead, create instances of a subclass, such as CBC or ECB.
Source:

Requires

  • module:convert

Methods

get_words_per_block() → {number}

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

initialize(data) → {BlockCipherMode}

Invoked during subclass initialization. All properties needed to initialize the class must be passed in.
Parameters:
Name Type Description
data Object A list of properties used to initialize the class.
Properties
Name Type Argument Description
cipher BlockCipher A reference to a BlockCipher subclass instance. Used to actually *crypt any given block.
iv string <optional>
ASCII string containing Initial Vector (IV). Not required for ECB
Source:
Returns:
Type
BlockCipherMode