Class: AuthConfig

AuthConfig()

Device Authorization Configuration. This represents the authorization that will be provided to the target device to allow writing operations for a virtual drive.

Constructor

new AuthConfig()

Instantiate a class with the properties of the authorization config file.
Source:

Classes

AuthConfig

Methods

getAuthId() → {Uint8Array}

Get the authorization ID for the target device.
Source:
Returns:
The auth id
Type
Uint8Array

getDriveId() → {Uint8Array}

Get the drive ID to grant authorization for.
Source:
Returns:
The drive id
Type
Uint8Array

getMaxNonce() → {Uint8Array}

Get the nonce maximum value the target device will use.
Source:
Returns:
The nonce max value.
Type
Uint8Array

getStartNonce() → {Uint8Array}

Get the nonce maximum value the target device will use.
Source:
Returns:
The starting nonce.
Type
Uint8Array

(async) init(contents)

Initialize the authorization configuration.
Parameters:
Name Type Description
contents Uint8Array The authorization configuration data
Source:

(async, static) exportAuthFile(drive, targetAuthId, file)

Parameters:
Name Type Description
drive AesDrive The drive
targetAuthId string The authorization id of the target device.
file IFile The file
Source:
Throws:
Exception If an error occurs during export

(async, static) importAuthFile(drive, authConfigFile)

Import the device authorization file.
Parameters:
Name Type Description
drive AesDrive The drive
authConfigFile IFile The filepath to the authorization file.
Source:
Throws:
Exception