Class: AEAD

crypto/chachapoly.AEAD

Methods

aad(aad)

Update the aad (will be finalized on an encrypt/decrypt call).

Parameters:
Name Type Description
aad Buffer
Source:

auth(data)

Authenticate data without decrypting.

Parameters:
Name Type Description
data Buffer
Source:

decrypt(data)

Decrypt a piece of data.

Parameters:
Name Type Description
data Buffer
Source:

encrypt(data)

Encrypt a piece of data.

Parameters:
Name Type Description
data Buffer
Source:

finish() → {Buffer}

Finalize the aead and generate a MAC.

Source:
Returns:

MAC

Type
Buffer

init(key, iv)

Initialize the AEAD with a key and iv.

Parameters:
Name Type Description
key Buffer
iv Buffer

IV / packet sequence number.

Source:

(private) pad16(size)

Pad a chunk before updating mac.

Parameters:
Name Type Description
size Number
Source: