import KeyStoreCryptoEngine from 'token-io/src/security/engines/KeyStoreCryptoEngine.js'
KeyStoreCryptoEngine
Direct Subclass:
Base crypto engine that are extended by others. It handles signatures, verifications, and key storage.
Constructor Summary
Public Constructor | ||
public |
constructor(memberId: *, keystore: *) |
Method Summary
Public Methods | ||
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. |
Public Constructors
public constructor(memberId: *, keystore: *) source
Params:
Name | Type | Attribute | Description |
memberId | * | ||
keystore | * |
Public Methods
public async createSigner(level: string): Object source
Create a signer. Assumes we previously generated the relevant key.
Params:
Name | Type | Attribute | Description |
level | string | privilege level 'LOW', 'STANDARD', 'PRIVILEGED' |
public async createVerifier(keyId: string): Object source
Create a verifier. Assumes we have the key with the passed ID.
Params:
Name | Type | Attribute | Description |
keyId | string | ID of key to use |