Kind: global class
this: {GCM}
Creates an instance of GCM
Initialize GCM mode
Kind: instance method of GCM
this: {GCM}
Param | Description |
---|---|
nk | is the key length in bytes, 16, 24 or 32 |
key | the AES key as an array of 16 bytes |
niv | the number of bytes in the Initialisation Vector (IV) |
iv | the IV |
Add header (material to be authenticated but not encrypted)
Kind: instance method of GCM
this: {GCM}
Param | Description |
---|---|
header | is the header material to be added |
len | the number of bytes in the header |
Add plaintext and extract ciphertext
Kind: instance method of GCM
Returns: cipher is the ciphertext generated
this: {GCM}
Param | Description |
---|---|
plain | is the plaintext material to be added |
len | the number of bytes in the plaintext |
Add Ciphertext - decrypts to plaintext
Kind: instance method of GCM
Returns: plain is the plaintext material generated
this: {GCM}
Param | Description |
---|---|
cipher | is the ciphertext to be added |
len | the number of bytes in the plaintext |