Constructor
new SalmonDriveConfig(contents)
Provide a class that hosts the properties of the drive config file
Parameters:
Name | Type | Description |
---|---|---|
contents |
The byte array that contains the contents of the config file |
Classes
Methods
clear()
Clear properties.
getEncryptedData()
Get encrypted data using the master key: drive key, hash key, drive id.
Returns:
getHashSignature()
Get the hash signature that was used to sign this drive configuration.
Returns:
getIterations()
Get the iterations to be used for the key derivation.
Returns:
getIv()
Get the initial vector that was used to encrypt this drive configuration.
Returns:
getMagicBytes()
Get the magic bytes from the config file.
Returns:
getSalt()
Get the salt to be used for the password key derivation.
Returns:
(async, static) writeDriveConfig(configFile, magicBytes, version, salt, iterations, keyIv, encryptedData, hashSignature)
Write the properties of a drive to a config file
Parameters:
Name | Type | Description |
---|---|---|
configFile |
The configuration file that will be used to write the content into | |
magicBytes |
The magic bytes for the header | |
version |
The version of the file format | |
salt |
The salt that will be used for encryption of the combined key | |
iterations |
The iteration that will be used to derive the master key from a text password | |
keyIv |
The initial vector that was used with the master password to encrypt the combined key | |
encryptedData |
The encrypted combined key and drive id | |
hashSignature |
The hash signature of the drive id |