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 Signature

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

Call Signature

get(): Crypto

Returns default crypto

Returns

Crypto

Throws

Error whenever default provider not set

Call Signature

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

Call Signature

set(value): this

Sets default crypto

Parameters
value

Crypto

Returns

this

Call Signature

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