Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Variables

Const encryptionAlgo

encryptionAlgo: "AES-GCM" = "AES-GCM"

Default encryption to use. AES-GCM uses an IV and outputs a ciphertext which also contains an authenticated tag.

Const ivLength

ivLength: 12 = 12

Default initialization vector length (in bytes) to use.

Const keySize

keySize: 256 = 256

Const tagLength

tagLength: 128 = 128

Default authentication tag length (in bits) to use.

Functions

generateNonce

  • generateNonce(): Uint8Array

getDefaultEncryptParams

  • getDefaultEncryptParams(generateNewNonce: boolean): object
  • getDefaultEncryptParams returns the object containing the parameters needed by the encrypt function.

    params

    generateNewNonce Should be true if used for encrypting, false if used for decrypting.

    Parameters

    • generateNewNonce: boolean

    Returns object

    • iv: Uint8Array
    • length: number
    • name: string
    • tagLength: number

joinNonceCiphertext

  • joinNonceCiphertext(nonce: Uint8Array, ciphertext: Uint8Array): Promise<Uint8Array>

splitNonceCiphertext

  • splitNonceCiphertext(data: Uint8Array): Promise<[Uint8Array, Uint8Array]>
  • joinNonceCiphertext concatenates the nonce and the ciphertext.

    params

    data The concatenation of the nonce and the ciphertext.

    Parameters

    • data: Uint8Array

    Returns Promise<[Uint8Array, Uint8Array]>

    An array containing the nonce and the ciphertext

Object literals

Const defaultImportEncryptionParams

defaultImportEncryptionParams: object

name

name: string = encryptionAlgo

Default encryption Algorithm to use.

Const defaultSymmetricEncryptionParams

defaultSymmetricEncryptionParams: object

length

length: number = keySize

Default key size to use. 128, 192 or 256 for AES.

name

name: string = encryptionAlgo

Default encryption Algorithm to use.

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