import UnsecuredFileCryptoEngine from 'token-io/src/security/engines/UnsecuredFileCryptoEngine.js'
UnsecuredFileCryptoEngine
Extends:
Static Method Summary
Static Public Methods | ||
public static |
Get ID of 'active' member. |
|
public static |
setDirRoot(dirRoot: string) Set the dir in which we'll store key-files. When an sdk user calls const Token = new TokenIO({env: 'sandbox', developerKey: devKey, keyDir: './keys'}); that calls UnsecuredFileCryptoEngine.setDirRoot('./keys') |
Constructor Summary
Public Constructor | ||
public |
constructor(memberId: string) Constructs the engine |
Inherited Summary
From class KeyStoreCryptoEngine | ||
private |
_keystore: * |
|
private |
_memberId: * |
|
public |
async createSigner(level: string): Object Create a signer. |
|
public |
async createVerifier(keyId: string): Object Create a verifier. |
|
public |
async generateKey(level: string, expirationMs: number): Object Generate a key pair and store it. |
Static Public Methods
public static getActiveMemberId(): string source
Get ID of 'active' member. (This would make more sense in browser, where we'd use it to keep track of browser-linked member.)
public static setDirRoot(dirRoot: string) source
Set the dir in which we'll store key-files. When an sdk user calls const Token = new TokenIO({env: 'sandbox', developerKey: devKey, keyDir: './keys'}); that calls UnsecuredFileCryptoEngine.setDirRoot('./keys')
Params:
Name | Type | Attribute | Description |
dirRoot | string | path |
Public Constructors
public constructor(memberId: string) source
Constructs the engine
Override:
KeyStoreCryptoEngine#constructorParams:
Name | Type | Attribute | Description |
memberId | string | memberId of the member we want to create the engine for |