Class: SalmonDriveGenerator

SalmonDriveGenerator()

Utility class generates internal secure properties for the drive.

Constructor

new SalmonDriveGenerator()

Source:

Members

(static) AUTH_ID_SIZE

Auth ID size
Source:

(static) COMBINED_KEY_LENGTH

combined key is drive key + hash key.
Source:

(static) DRIVE_ID_LENGTH

Drive ID size.
Source:

(static) ITERATIONS_LENGTH

Length for the iterations that will be stored in the encrypted data header.
Source:

(static) IV_LENGTH

Initial vector length that will be used for encryption and master encryption of the combined key
Source:

(static) MASTER_KEY_LENGTH

Master key to encrypt the combined key we also use AES256.
Source:

(static) SALT_LENGTH

Salt length.
Source:

Methods

(static) generateAuthId()

Generate a secure random authorization ID.
Source:
Returns:
The authorization Id (16 bytes).

(static) generateCombinedKey()

Generates a secure random combined key (drive key + hash key)
Source:
Returns:
The length of the combined key.

(static) generateDriveID()

Generate a Drive ID.
Source:
Returns:
The Drive ID.

(static) generateMasterKeyIV()

Generates the initial vector that will be used with the master key to encrypt the combined key (drive key + hash key)
Source:

(static) generateSalt()

Generates a salt.
Source:
Returns:
The salt byte array.

(static) getIterations()

Returns the iterations used for deriving the combined key from the text password
Source:
Returns:
The current iterations for the key derivation.

(static) getMaxNonce()

Get the default max nonce to be used for drives.
Source:
Returns:
A secure random byte array (8 bytes).

(static) getStartingNonce()

Get the starting nonce that will be used for encrypt drive files and filenames.
Source:
Returns:
A secure random byte array (8 bytes).

(static) setIterations(iterations)

Set the default iterations.
Parameters:
Name Type Description
iterations The iterations
Source: