# Module: crypto/mode/eax

This module implements AES-EAX en/decryption on top of native AES-CTR using either the WebCrypto API or Node.js' crypto API.

Source:
  - crypto/mode/eax.js, line 18

### Methods

#### (inner) decrypt(ciphertext, nonce, adata) → {Promise.<Uint8Array>}

Decrypt ciphertext input.

##### Parameters:

Name | Type | Description
--- | --- | ---
`ciphertext` | Uint8Array | The ciphertext input to be decrypted
`nonce` | Uint8Array | The nonce (16 bytes)
`adata` | Uint8Array | Associated data to verify

Source:
  - crypto/mode/eax.js, line 134

##### Returns:

The plaintext output.

Type
  Promise.<Uint8Array>

#### (async, inner) EAX(cipher, key)

Class to en/decrypt using EAX mode.

##### Parameters:

Name | Type | Description
--- | --- | ---
`cipher` | enums.symmetric | The symmetric cipher algorithm to use
`key` | Uint8Array | The encryption key

Source:
  - crypto/mode/eax.js, line 87

#### (inner) encrypt(plaintext, nonce, adata) → {Promise.<Uint8Array>}

Encrypt plaintext input.

##### Parameters:

Name | Type | Description
--- | --- | ---
`plaintext` | Uint8Array | The cleartext input to be encrypted
`nonce` | Uint8Array | The nonce (16 bytes)
`adata` | Uint8Array | Associated data to sign

Source:
  - crypto/mode/eax.js, line 110

##### Returns:

The ciphertext output.

Type
  Promise.<Uint8Array>