Constructor
new AuthConfig()
Instantiate a class with the properties of the authorization config file.
Classes
Methods
getAuthId() → {Uint8Array}
Get the authorization ID for the target device.
Returns:
The auth id
- Type
- Uint8Array
getDriveId() → {Uint8Array}
Get the drive ID to grant authorization for.
Returns:
The drive id
- Type
- Uint8Array
getMaxNonce() → {Uint8Array}
Get the nonce maximum value the target device will use.
Returns:
The nonce max value.
- Type
- Uint8Array
getStartNonce() → {Uint8Array}
Get the nonce maximum value the target device will use.
Returns:
The starting nonce.
- Type
- Uint8Array
(async) init(contents)
Initialize the authorization configuration.
Parameters:
Name | Type | Description |
---|---|---|
contents |
Uint8Array | The authorization configuration data |
(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 |
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. |
Throws:
Exception