Home Reference Source Test
public class | source

UnsecuredFileCryptoEngine

Extends:

@token-io/core~KeyStoreCryptoEngine → UnsecuredFileCryptoEngine

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

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.)

Return:

string

member ID of active member (or throw if none such);

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:

NameTypeAttributeDescription
dirRoot string

path

Public Constructors

public constructor(memberId: string) source

Constructs the engine

Params:

NameTypeAttributeDescription
memberId string

memberId of the member we want to create the engine for