Module: crypto/mode/cfb

Methods

(static) decrypt(algo, key, ciphertext, iv)

CFB decryption

Parameters:
Name Type Description
algo enums.symmetric

block cipher algorithm

key Uint8Array
ciphertext MaybeStream.<Uint8Array>
iv Uint8Array
Source:
Returns:

MaybeStream

(static) encrypt(algo, key, plaintext, iv, config)

CFB encryption

Parameters:
Name Type Description
algo enums.symmetric

block cipher algorithm

key Uint8Array
plaintext MaybeStream.<Uint8Array>
iv Uint8Array
config Object

full configuration, defaults to openpgp.config

Source:
Returns:

MaybeStream

(async, static) getPrefixRandom(algo) → {Promise.<Uint8Array>}

Generates a random byte prefix for the specified algorithm See RFC 4880 9.2 for algorithms.

Parameters:
Name Type Description
algo module:enums.symmetric

Symmetric encryption algorithm

Source:
Returns:

Random bytes with length equal to the block size of the cipher, plus the last two bytes repeated.

Type
Promise.<Uint8Array>