Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Crypto

Class for managing encrypting and decrypting private auth information.

Hierarchy

  • AsyncOptionalCreatable<CryptoOptions>
    • Crypto

Index

Methods

close

  • close(): void
  • Clears the crypto state. This should be called in a finally block.

    Returns void

decrypt

  • decrypt(text?: undefined | string): Optional<string>
  • Decrypts text.

    Parameters

    • Optional text: undefined | string

      The text to decrypt.

    Returns Optional<string>

encrypt

  • encrypt(text?: undefined | string): Optional<string>
  • Encrypts text. Returns the encrypted string or undefined if no string was passed.

    Parameters

    • Optional text: undefined | string

      The text to encrypt.

    Returns Optional<string>

Protected init

  • init(): Promise<void>
  • Initialize async components.

    Returns Promise<void>

Static create

  • create<P, T>(this: object, options?: P): Promise<T>
  • Asynchronously constructs and initializes a new instance of a concrete subclass with the optional options.

    Type parameters

    • P

    • T: AsyncOptionalCreatable<P>

    Parameters

    • this: object
    • Optional options: P

      An options object providing initialization params to the async constructor.

    Returns Promise<T>