"crypto" | typescript
Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

ECDHKeyFormat

ECDHKeyFormat: "compressed" | "uncompressed" | "hybrid"

HexBase64BinaryEncoding

HexBase64BinaryEncoding: "binary" | "base64" | "hex"

HexBase64Latin1Encoding

HexBase64Latin1Encoding: "latin1" | "hex" | "base64"

Utf8AsciiBinaryEncoding

Utf8AsciiBinaryEncoding: "utf8" | "ascii" | "binary"

Utf8AsciiLatin1Encoding

Utf8AsciiLatin1Encoding: "utf8" | "ascii" | "latin1"

Variables

DEFAULT_ENCODING

DEFAULT_ENCODING: string

fips

fips: boolean

Functions

createCipher

  • createCipher(algorithm: string, password: any): Cipher
  • Parameters

    • algorithm: string
    • password: any

    Returns Cipher

createCipheriv

  • createCipheriv(algorithm: string, key: any, iv: any): Cipher
  • Parameters

    • algorithm: string
    • key: any
    • iv: any

    Returns Cipher

createCredentials

  • Parameters

    Returns Credentials

createDecipher

  • createDecipher(algorithm: string, password: any): Decipher
  • Parameters

    • algorithm: string
    • password: any

    Returns Decipher

createDecipheriv

  • createDecipheriv(algorithm: string, key: any, iv: any): Decipher
  • Parameters

    • algorithm: string
    • key: any
    • iv: any

    Returns Decipher

createDiffieHellman

  • Parameters

    • prime_length: number
    • Optional generator: number

    Returns DiffieHellman

  • Parameters

    Returns DiffieHellman

  • Parameters

    Returns DiffieHellman

  • Parameters

    Returns DiffieHellman

  • Parameters

    Returns DiffieHellman

createECDH

  • createECDH(curve_name: string): ECDH
  • Parameters

    • curve_name: string

    Returns ECDH

createHash

  • createHash(algorithm: string): Hash
  • Parameters

    • algorithm: string

    Returns Hash

createHmac

  • createHmac(algorithm: string, key: string | Buffer): Hmac
  • Parameters

    • algorithm: string
    • key: string | Buffer

    Returns Hmac

createSign

  • createSign(algorithm: string): Signer
  • Parameters

    • algorithm: string

    Returns Signer

createVerify

  • createVerify(algorith: string): Verify
  • Parameters

    • algorith: string

    Returns Verify

getCiphers

  • getCiphers(): string[]
  • Returns string[]

getCurves

  • getCurves(): string[]
  • Returns string[]

getDiffieHellman

  • Parameters

    • group_name: string

    Returns DiffieHellman

getHashes

  • getHashes(): string[]
  • Returns string[]

pbkdf2

  • pbkdf2(password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string, callback: function): void
  • Parameters

    • password: string | Buffer
    • salt: string | Buffer
    • iterations: number
    • keylen: number
    • digest: string
    • callback: function
        • (err: Error, derivedKey: Buffer): any
        • Parameters

          • err: Error
          • derivedKey: Buffer

          Returns any

    Returns void

pbkdf2Sync

  • pbkdf2Sync(password: string | Buffer, salt: string | Buffer, iterations: number, keylen: number, digest: string): Buffer
  • Parameters

    • password: string | Buffer
    • salt: string | Buffer
    • iterations: number
    • keylen: number
    • digest: string

    Returns Buffer

privateDecrypt

  • Parameters

    Returns Buffer

privateEncrypt

  • Parameters

    Returns Buffer

pseudoRandomBytes

  • pseudoRandomBytes(size: number): Buffer
  • pseudoRandomBytes(size: number, callback: function): void
  • Parameters

    • size: number

    Returns Buffer

  • Parameters

    • size: number
    • callback: function
        • (err: Error, buf: Buffer): void
        • Parameters

          Returns void

    Returns void

publicDecrypt

  • Parameters

    Returns Buffer

publicEncrypt

  • Parameters

    Returns Buffer

randomBytes

  • randomBytes(size: number): Buffer
  • randomBytes(size: number, callback: function): void
  • Parameters

    • size: number

    Returns Buffer

  • Parameters

    • size: number
    • callback: function
        • (err: Error, buf: Buffer): void
        • Parameters

          Returns void

    Returns void

timingSafeEqual

  • Parameters

    Returns 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