KeyPair
Extends:
Static Method Summary
Static Public Methods | ||
public static |
derive(privateKey: PrivateKey): KeyPair |
|
public static |
async fromEncrypted(buf: SerialBuffer, key: Uint8Array): Promise<KeyPair> |
|
public static |
|
|
public static |
|
|
public static |
unserialize(buf: SerialBuffer): KeyPair |
Member Summary
Public Members | ||
public get |
encryptedSize: number |
|
public get |
isLocked: * |
|
public get |
The unlocked private key. |
|
public get |
|
|
public get |
serializedSize: number |
Method Summary
Public Methods | ||
public |
equals(o: Serializable): boolean |
|
public |
async exportEncrypted(key: Uint8Array, unlockKey: Uint8Array): Promise<Uint8Array> |
|
public |
async lock(key: Uint8Array, lockSalt: Uint8Array) |
|
public |
relock() Destroy cached unlocked private key if the internal key is in locked state. |
|
public |
serialize(buf: SerialBuffer): SerialBuffer |
|
public |
async unlock(key: Uint8Array) |
Inherited Summary
From class Serializable | ||
public |
compare(o: Serializable): number |
|
public |
equals(o: Serializable): boolean |
|
public |
hashCode(): * |
|
public abstract |
serialize(buf: SerialBuffer) |
|
public |
toBase64(): string |
|
public |
toHex(): string |
|
public |
toString(): string |
Static Public Methods
public static derive(privateKey: PrivateKey): KeyPair source
Params:
Name | Type | Attribute | Description |
privateKey | PrivateKey |
public static async fromEncrypted(buf: SerialBuffer, key: Uint8Array): Promise<KeyPair> source
Params:
Name | Type | Attribute | Description |
buf | SerialBuffer | ||
key | Uint8Array |
public static fromHex(hexBuf: string): KeyPair source
Params:
Name | Type | Attribute | Description |
hexBuf | string |
public static unserialize(buf: SerialBuffer): KeyPair source
Params:
Name | Type | Attribute | Description |
buf | SerialBuffer |
Public Members
public get encryptedSize: number source
public get isLocked: * source
public get serializedSize: number source
Public Methods
public equals(o: Serializable): boolean source
Override:
Serializable#equalsParams:
Name | Type | Attribute | Description |
o | Serializable |
Return:
boolean |
public async exportEncrypted(key: Uint8Array, unlockKey: Uint8Array): Promise<Uint8Array> source
Params:
Name | Type | Attribute | Description |
key | Uint8Array | ||
unlockKey | Uint8Array |
|
Return:
Promise<Uint8Array> |
public async lock(key: Uint8Array, lockSalt: Uint8Array) source
Params:
Name | Type | Attribute | Description |
key | Uint8Array | ||
lockSalt | Uint8Array |
|
public serialize(buf: SerialBuffer): SerialBuffer source
Override:
Serializable#serializeParams:
Name | Type | Attribute | Description |
buf | SerialBuffer |
|
public async unlock(key: Uint8Array) source
Params:
Name | Type | Attribute | Description |
key | Uint8Array |