fs2.internal.jsdeps.node.cryptoMod
Type members
Classlikes
Types
Value members
Concrete methods
Computes the Diffie-Hellman secret based on a privateKey and a publicKey. Both keys must have the same asymmetricKeyType, which must be one of 'dh' (for Diffie-Hellman), 'ec' (for ECDH), 'x448', or 'x25519' (for ECDH-ES).
Computes the Diffie-Hellman secret based on a privateKey and a publicKey. Both keys must have the same asymmetricKeyType, which must be one of 'dh' (for Diffie-Hellman), 'ec' (for ECDH), 'x448', or 'x25519' (for ECDH-ES).
Returns information about a given cipher.
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 keyLenth and ivLenth options.
If the given values are unacceptable, undefined will be returned.
- Value Params
- nameOrNid
The name or nid of the cipher to query.
HKDF is a simple key derivation function defined in RFC 5869.
The given key, salt and info are used with the digest to derive a key of keylen bytes.
HKDF is a simple key derivation function defined in RFC 5869.
The given key, salt and info are used with the digest to derive a key of keylen bytes.
The supplied callback function is called with two arguments: err and derivedKey.
If an errors occurs while deriving the key, err will be set; otherwise err will be null.
The successfully generated derivedKey will be passed to the callback as an ArrayBuffer.
An error will be thrown if any of the input aguments specify invalid values or types.
Provides a synchronous HKDF key derivation function as defined in RFC 5869.
The given key, salt and info are used with the digest to derive a key of keylen bytes.
Provides a synchronous HKDF key derivation function as defined in RFC 5869.
The given key, salt and info are used with the digest to derive a key of keylen bytes.
The successfully generated derivedKey will be returned as an ArrayBuffer.
An error will be thrown if any of the input aguments specify invalid values or types,
or if the derived key cannot be generated.
Calculates and returns the signature for data using the given private key and
algorithm. If algorithm is null or undefined, then the algorithm is
dependent upon the key type (especially Ed25519 and Ed448).
Calculates and returns the signature for data using the given private key and
algorithm. If algorithm is null or undefined, then the algorithm is
dependent upon the key type (especially Ed25519 and Ed448).
If key is not a KeyObject, this function behaves as if key had been
passed to `crypto.createPrivateKey().
Calculates and returns the signature for data using the given private key and
algorithm. If algorithm is null or undefined, then the algorithm is
dependent upon the key type (especially Ed25519 and Ed448).
Calculates and returns the signature for data using the given private key and
algorithm. If algorithm is null or undefined, then the algorithm is
dependent upon the key type (especially Ed25519 and Ed448).
If key is not a KeyObject, this function behaves as if key had been
passed to crypto.createPublicKey().