crypt.Cbc Extends

Inheritance

Constructor

goog.crypt.Cbc(cipheropt_blockSize)

Parameters

cipher : !goog.crypt.BlockCipher
The block cipher to use.
opt_blockSize : number=
The block size of the cipher in bytes. Defaults to 16 bytes.

Instance Methods

Public Protected Private
Defined in goog.crypt.Cbc
decrypt(cipherTextinitialVector) !Array.<number>
Decrypt a message.
Arguments:
cipherText : !Array.<number>
Message to decrypt. An array of bytes. The length should be a multiple of the block size.
initialVector : !Array.<number>
Initial vector for the CBC mode. An array of bytes with the same length as the block size.
Returns: !Array.<number>  Decrypted message.
code »
encrypt(plainTextinitialVector) !Array.<number>
Encrypt a message.
Arguments:
plainText : !Array.<number>
Message to encrypt. An array of bytes. The length should be a multiple of the block size.
initialVector : !Array.<number>
Initial vector for the CBC mode. An array of bytes with the same length as the block size.
Returns: !Array.<number>  Encrypted message.
code »

Instance Properties

Defined in goog.crypt.Cbc
blockSize_ :
Block size in bytes.
Code »
Block cipher.
Code »

Package crypt

Package Reference