Members
(static) AUTH_ID_SIZE
Auth ID size
(static) COMBINED_KEY_LENGTH
combined key is drive key + hash key.
(static) DRIVE_ID_LENGTH
Drive ID size.
(static) ITERATIONS_LENGTH
Length for the iterations that will be stored in the encrypted data header.
(static) IV_LENGTH
Initial vector length that will be used for encryption and master encryption of the combined key
(static) MASTER_KEY_LENGTH
Master key to encrypt the combined key we also use AES256.
(static) SALT_LENGTH
Salt length.
Methods
(static) generateAuthId() → {Uint8Array}
Generate a secure random authorization ID.
Returns:
The authorization Id (16 bytes).
- Type
- Uint8Array
(static) generateCombinedKey() → {Uint8Array}
Generates a secure random combined key (drive key + hash key)
Returns:
The length of the combined key.
- Type
- Uint8Array
(static) generateDriveID() → {Uint8Array}
Generate a Drive ID.
Returns:
The Drive ID.
- Type
- Uint8Array
(static) generateMasterKeyIV() → {Uint8Array}
Generates the initial vector that will be used with the master key to encrypt the combined key (drive key + hash key)
Returns:
The master key initial vector
- Type
- Uint8Array
(static) generateSalt() → {Uint8Array}
Generates a salt.
Returns:
The salt byte array.
- Type
- Uint8Array
(static) getIterations() → {number}
Returns the iterations used for deriving the combined key from
the text password
Returns:
The current iterations for the key derivation.
- Type
- number
(static) getMaxNonce() → {Uint8Array}
Get the default max nonce to be used for drives.
Returns:
A secure random byte array (8 bytes).
- Type
- Uint8Array
(static) getStartingNonce() → {Uint8Array}
Get the starting nonce that will be used for encrypt drive files and filenames.
Returns:
A secure random byte array (8 bytes).
- Type
- Uint8Array
(static) setIterations(iterations)
Set the default iterations.
Parameters:
Name | Type | Description |
---|---|---|
iterations |
number | The iterations |