Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AESCrypt

Hierarchy

  • AESCrypt

Index

Methods

Static decrypt

  • decrypt(enctext: string, cryptkey: string | Buffer, cipher?: Cipher, containsIV?: boolean, iv?: string | Buffer): string
  • Decrypts an AES encrypted text

    memberof

    AESCrypt

    Parameters

    • enctext: string
    • cryptkey: string | Buffer
    • Default value cipher: Cipher = Cipher.DEFAULT
    • Default value containsIV: boolean = false
    • Optional iv: string | Buffer

    Returns string

Static decryptRandomIV

  • decryptRandomIV(enctext: string, cryptkey: string | Buffer, cipher?: Cipher): string

Static encrypt

  • encrypt(text: string, cryptkey: string | Buffer, cipher?: Cipher, iv?: string | Buffer, addIV?: boolean): Promise<string>
  • Encrypts a string using AES.

    memberof

    AESCrypt

    Parameters

    • text: string
    • cryptkey: string | Buffer
    • Default value cipher: Cipher = Cipher.DEFAULT
    • Default value iv: string | Buffer = AESCrypt.DEFAULT_IV
    • Default value addIV: boolean = false

    Returns Promise<string>

Static encryptRandomIV

  • encryptRandomIV(text: string, cryptkey: string | Buffer, cipher?: Cipher): Promise<string>