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

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

Parameters

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

Returns

any