Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SafeBag

Index

Constructors

constructor

  • new SafeBag(certificate: Certificate, encryptedKey: Uint8Array): SafeBag

Properties

Readonly certificate

certificate: Certificate

Readonly encryptedKey

encryptedKey: Uint8Array

Methods

decryptKey

  • decryptKey(passphrase: string | Uint8Array): Promise<Uint8Array>
  • Decrypt private key and return unencrypted PKCS8 format.

    Parameters

    • passphrase: string | Uint8Array

    Returns Promise<Uint8Array>

encodeTo

  • encodeTo(encoder: Encoder): void

saveKeyPair

  • saveKeyPair(passphrase: string, keyChain: KeyChain, __namedParameters?: ImportOptions): Promise<void>
  • Save private key and public key to KeyChain.

    Parameters

    • passphrase: string

      SafeBag passphrase.

    • keyChain: KeyChain

      destination KeyChain.

    • __namedParameters: ImportOptions = {}

    Returns Promise<void>

Static create

  • create(certificate: Certificate, privateKey: Uint8Array, passphrase: string | Uint8Array): Promise<SafeBag>

Static decodeFrom

  • decodeFrom(decoder: Decoder): SafeBag

Generated using TypeDoc