Constructor
new AesGcmCipher(aesKey)
Parameters:
Name | Type | Description |
---|---|---|
aesKey |
SharedKey256 | AES shared key. |
Classes
Members
TAG_SIZE :number
Byte size of GCM tag.
Type:
- number
Methods
decrypt(cipherText, iv) → {Uint8Array}
Parameters:
Name | Type | Description |
---|---|---|
cipherText |
Uint8Array | Cipher text with appended tag to decrypt. |
iv |
Uint8Array | IV bytes. |
Returns:
Clear text.
- Type
- Uint8Array
encrypt(clearText, iv) → {Uint8Array}
Parameters:
Name | Type | Description |
---|---|---|
clearText |
Uint8Array | Clear text to encrypt. |
iv |
Uint8Array | IV bytes. |
Returns:
Cipher text with appended tag.
- Type
- Uint8Array