Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

decrypt

  • decrypt(ciphertext: Uint8Array, encryptionPrivateKey: CryptoKey): Promise<Uint8Array>
  • decrypt decrypts the given ciphertext.

    Parameters

    • ciphertext: Uint8Array
    • encryptionPrivateKey: CryptoKey

      The private key associated to the public key used to encrypt.

    Returns Promise<Uint8Array>

encrypt

  • encrypt(plaintext: Uint8Array, encryptionPublicKey: CryptoKey): Promise<Uint8Array>
  • encrypt returns the ciphertext of the given plaintext.

    Parameters

    • plaintext: Uint8Array
    • encryptionPublicKey: CryptoKey

      The public key used to encrypt.

    Returns Promise<Uint8Array>

exportKey

  • exportKey(key: CryptoKey): Promise<JsonWebKey>
  • exportKey exports a CryptoKeyPair to an {@link ICryptoKeyPairData}. The CryptoKeyPair should be the same as returned by {@link generateSigningKey} or generateEncryptionKey.

    Parameters

    • key: CryptoKey

    Returns Promise<JsonWebKey>

generateEncryptionKeyPair

  • generateEncryptionKeyPair(): Promise<CryptoKeyPair>

generateSigningKeyPair

  • generateSigningKeyPair(): Promise<CryptoKeyPair>

importKey

  • importKey(key: JsonWebKey): Promise<CryptoKey>
  • importKey imports an ICryptoKeyPairData to a CryptoKeyPair. The ICryptoKeyPairData should be the same as returned by exportKey.

    Parameters

    • key: JsonWebKey

    Returns Promise<CryptoKey>

sign

  • sign(plaintext: Uint8Array, signingPrivateKey: CryptoKey): Promise<Uint8Array>
  • sign returns the signature of the given plaintext

    Parameters

    • plaintext: Uint8Array
    • signingPrivateKey: CryptoKey

      The private key used to sign.

    Returns Promise<Uint8Array>

verifySignature

  • verifySignature(plaintext: Uint8Array, signature: Uint8Array, signingPublicKey: CryptoKey): Promise<boolean>
  • verifySignature verifies that the given signature and plaintext match.

    Parameters

    • plaintext: Uint8Array
    • signature: Uint8Array
    • signingPublicKey: CryptoKey

      THe public Key associated with the private key used to sign initially.

    Returns Promise<boolean>

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc