Members
(static) BLOCK_SIZE
Should be 16 for AES256 the same as the iv.
(static) CHUNK_SIZE_LENGTH
Chunk size format length.
(static) HASH_KEY_LENGTH
HASH Key length for integrity, currently we use HMAC SHA256.
(static) HASH_RESULT_LENGTH
Hash signature size for integrity, currently we use HMAC SHA256.
(static) KEY_LENGTH
Encryption key length for AES256.
(static) MAGIC_LENGTH
Lenght for the magic bytes.
(static) NONCE_LENGTH
Nonce size.
(static) VERSION
Version.
(static) VERSION_LENGTH
Length for the Version in the data header.
Methods
(static) getMagicBytes() → {Uint8Array}
Gets the fixed magic bytes array
Returns:
The magic bytes
- Type
- Uint8Array
(static) getSecureRandomBytes(size)
Returns a secure random byte array. To be used when generating keys, initial vectors, and nonces.
Parameters:
Name | Type | Description |
---|---|---|
size |
number | The size of the byte array. |
Returns:
The random secure byte array.
(static) getVersion() → {number}
Returns the current Salmon format version.
Returns:
The current version
- Type
- number