Skip to main content

CryptoProvider

Crypto provider

Constructors

new CryptoProvider()

new CryptoProvider(): CryptoProvider

Creates a new instance

Returns

CryptoProvider

Properties

[toStringTag]

[toStringTag]: string = "CryptoProvider"


DEFAULT

static DEFAULT: string = "default"

Accessors

size

get size(): number

Returns

number

Methods

[iterator]()

[iterator](): IterableIterator<[string, Crypto]>

Returns

IterableIterator<[string, Crypto]>


clear()

clear(): void

Returns

void


delete()

delete(key): boolean

Parameters

key: string

Returns

boolean


entries()

entries(): IterableIterator<[string, Crypto]>

Returns

IterableIterator<[string, Crypto]>


forEach()

forEach(callbackfn, thisArg?): void

Parameters

callbackfn: MapForEachCallback

thisArg?: any

Returns

void


get()

get()

get(): Crypto

Returns default crypto

Returns

Crypto

Throws

Error whenever default provider not set

get(key)

get(key): Crypto

Returns crypto by name

Parameters

key: string

Crypto name

Returns

Crypto

Throws

Error whenever provider with specified identifier does not exist


has()

has(key): boolean

Parameters

key: string

Returns

boolean


keys()

keys(): IterableIterator<string>

Returns

IterableIterator<string>


set()

set(value)

set(value): this

Sets default crypto

Parameters

value: Crypto

Returns

this

set(key, value)

set(key, value): this

Sets crypto with specified identifier

Parameters

key: string

Identifier

value: Crypto

crypto provider

Returns

this


values()

values(): IterableIterator<Crypto>

Returns

IterableIterator<Crypto>


isCryptoKey()

static isCryptoKey(data): data is CryptoKey

Parameters

data: any

Returns

data is CryptoKey


isCryptoKeyPair()

static isCryptoKeyPair(data): data is CryptoKeyPair

Returns true if data is CryptoKeyPair

Parameters

data: any

Returns

data is CryptoKeyPair