Dynamic module crypto

Index

Interfaces

Functions

Functions

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

Parameters

  • algorithm: string
  • password: any

Returns

Cipher

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

Parameters

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

Returns

Cipher

createCredentials(details: CredentialDetails): Credentials

Parameters

Returns

Credentials

createDiffieHellman(prime_length: number): DiffieHellman

Parameters

  • prime_length: number

Returns

DiffieHellman

createDiffieHellman(prime: number, encoding?: string): DiffieHellman

Parameters

  • prime: number
  • encoding?: string optional

Returns

DiffieHellman

createHash(algorithm: string): Hash

Parameters

  • algorithm: string

Returns

Hash

createHmac(algorithm: string, key: string): Hmac

Parameters

  • algorithm: string
  • key: string

Returns

Hmac

createSign(algorithm: string): Signer

Parameters

  • algorithm: string

Returns

Signer

createVerify(algorith: string): Verify

Parameters

  • algorith: string

Returns

Verify

getDiffieHellman(group_name: string): DiffieHellman

Parameters

  • group_name: string

Returns

DiffieHellman

pbkdf2(password: string, salt: string, iterations: number, keylen: number, callback: (err: Error, derivedKey: string) => any)

Parameters

  • password: string
  • salt: string
  • iterations: number
  • keylen: number
  • callback: (err: Error, derivedKey: string) => any

pbkdf2Sync(password: string, salt: string, iterations: number, keylen: number): Buffer

Parameters

  • password: string
  • salt: string
  • iterations: number
  • keylen: number

Returns

Buffer

pseudoRandomBytes(size: number): Buffer

Parameters

  • size: number

Returns

Buffer

pseudoRandomBytes(size: number, callback: (err: Error, buf: Buffer) => void)

Parameters

  • size: number
  • callback: (err: Error, buf: Buffer) => void

randomBytes(size: number): Buffer

Parameters

  • size: number

Returns

Buffer

randomBytes(size: number, callback: (err: Error, buf: Buffer) => void)

Parameters

  • size: number
  • callback: (err: Error, buf: Buffer) => void