Class: SalmonDriveConfig

SalmonDriveConfig(contents)

Represents a configuration file for a drive. The properties are encrypted in the file with a master key which is password derived.

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
Source:

Classes

SalmonDriveConfig

Methods

clear()

Clear properties.
Source:

getEncryptedData()

Get encrypted data using the master key: drive key, hash key, drive id.
Source:
Returns:

getHashSignature()

Get the hash signature that was used to sign this drive configuration.
Source:
Returns:

getIterations()

Get the iterations to be used for the key derivation.
Source:
Returns:

getIv()

Get the initial vector that was used to encrypt this drive configuration.
Source:
Returns:

getMagicBytes()

Get the magic bytes from the config file.
Source:
Returns:

getSalt()

Get the salt to be used for the password key derivation.
Source:
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
Source: