Skip to main content
getCipherInfo - crypto - Node documentation
function getCipherInfo

Usage in Deno

import { getCipherInfo } from "node:crypto";
getCipherInfo(
nameOrNid: string | number,
): CipherInfo | undefined

Returns information about a given cipher.

Some ciphers accept variable length keys and initialization vectors. By default, the crypto.getCipherInfo() method will return the default values for these ciphers. To test if a given key length or iv length is acceptable for given cipher, use the keyLength and ivLength options. If the given values are unacceptable, undefined will be returned.

Parameters

nameOrNid: string | number

The name or nid of the cipher to query.

optional
options: CipherInfoOptions

Return Type

CipherInfo | undefined
Back to top