AesCbcCipher

AesCbcCipher

Performs AES CBC encryption and decryption with a given key.

Constructor

new AesCbcCipher(aesKey)

Description:
  • Creates a cipher around an aes shared key.

Source:
Parameters:
Name Type Description
aesKey SharedKey256

AES shared key.

Classes

AesCbcCipher

Methods

decrypt(cipherText, iv) → {Uint8Array}

Description:
  • Decrypts cipher text.

Source:
Parameters:
Name Type Description
cipherText Uint8Array

Cipher text to decrypt.

iv Uint8Array

IV bytes.

Returns:

Clear text.

Type
Uint8Array

encrypt(clearText, iv) → {Uint8Array}

Description:
  • Encrypts clear text.

Source:
Parameters:
Name Type Description
clearText Uint8Array

Clear text to encrypt.

iv Uint8Array

IV bytes.

Returns:

Cipher text.

Type
Uint8Array