Update dependencies

This commit is contained in:
grandeljay 2022-07-15 09:58:48 +02:00
parent 0436f40ac7
commit e3fe1086d5
400 changed files with 10248 additions and 2956 deletions

View file

@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v14.
### Additional Details
* Last updated: Tue, 07 Jun 2022 19:01:36 GMT
* Last updated: Wed, 13 Jul 2022 21:02:30 GMT
* Dependencies: none
* Global values: `AbortController`, `AbortSignal`, `Buffer`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`

View file

@ -406,9 +406,9 @@ declare module 'crypto' {
private constructor();
generateKeys(): Buffer;
generateKeys(encoding: BinaryToTextEncoding): string;
computeSecret(other_public_key: NodeJS.ArrayBufferView): Buffer;
computeSecret(other_public_key: string, input_encoding: BinaryToTextEncoding): Buffer;
computeSecret(other_public_key: NodeJS.ArrayBufferView, output_encoding: BinaryToTextEncoding): string;
computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding?: null, outputEncoding?: null): Buffer;
computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding?: null): Buffer;
computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding: null, outputEncoding: BinaryToTextEncoding): string;
computeSecret(
other_public_key: string,
input_encoding: BinaryToTextEncoding,
@ -428,7 +428,42 @@ declare module 'crypto' {
setPrivateKey(private_key: string, encoding: BufferEncoding): void;
verifyError: number;
}
function getDiffieHellman(group_name: string): DiffieHellman;
/**
* The `DiffieHellmanGroup` class takes a well-known modp group as its argument.
* It works the same as `DiffieHellman`, except that it does not allow changing its keys after creation.
* In other words, it does not implement `setPublicKey()` or `setPrivateKey()` methods.
*
* ```js
* const { createDiffieHellmanGroup } = await import('node:crypto');
* const dh = createDiffieHellmanGroup('modp1');
* ```
* The name (e.g. `'modp1'`) is taken from [RFC 2412](https://www.rfc-editor.org/rfc/rfc2412.txt) (modp1 and 2) and [RFC 3526](https://www.rfc-editor.org/rfc/rfc3526.txt):
* ```bash
* $ perl -ne 'print "$1\n" if /"(modp\d+)"/' src/node_crypto_groups.h
* modp1 # 768 bits
* modp2 # 1024 bits
* modp5 # 1536 bits
* modp14 # 2048 bits
* modp15 # etc.
* modp16
* modp17
* modp18
* ```
* @since v0.7.5
*/
const DiffieHellmanGroup: DiffieHellmanGroupConstructor;
interface DiffieHellmanGroupConstructor {
new(name: string): DiffieHellmanGroup;
(name: string): DiffieHellmanGroup;
readonly prototype: DiffieHellmanGroup;
}
type DiffieHellmanGroup = Omit<DiffieHellman, 'setPublicKey' | 'setPrivateKey'>;
function getDiffieHellman(groupName: string): DiffieHellmanGroup;
/**
* An alias for {@link getDiffieHellman}
* @since v0.9.3
*/
function createDiffieHellmanGroup(name: string): DiffieHellmanGroup;
function pbkdf2(
password: BinaryLike,
salt: BinaryLike,
@ -531,6 +566,12 @@ declare module 'crypto' {
function getCiphers(): string[];
function getCurves(): string[];
function getFips(): 1 | 0;
/**
* Enables the FIPS compliant crypto provider in a FIPS-enabled Node.js build. Throws an error if FIPS mode is not available.
* @since v10.0.0
* @param bool `true` to enable FIPS mode.
*/
function setFips(bool: boolean): void;
function getHashes(): string[];
class ECDH {
private constructor();
@ -1207,6 +1248,35 @@ declare module 'crypto' {
* 'dh' (for Diffie-Hellman), 'ec' (for ECDH), 'x448', or 'x25519' (for ECDH-ES).
*/
function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer;
/**
* Load and set the `engine` for some or all OpenSSL functions (selected by flags).
*
* `engine` could be either an id or a path to the engine's shared library.
*
* The optional `flags` argument uses `ENGINE_METHOD_ALL` by default.
* The `flags` is a bit field taking one of or a mix of the following flags (defined in `crypto.constants`):
*
* - `crypto.constants.ENGINE_METHOD_RSA`
* - `crypto.constants.ENGINE_METHOD_DSA`
* - `crypto.constants.ENGINE_METHOD_DH`
* - `crypto.constants.ENGINE_METHOD_RAND`
* - `crypto.constants.ENGINE_METHOD_EC`
* - `crypto.constants.ENGINE_METHOD_CIPHERS`
* - `crypto.constants.ENGINE_METHOD_DIGESTS`
* - `crypto.constants.ENGINE_METHOD_PKEY_METHS`
* - `crypto.constants.ENGINE_METHOD_PKEY_ASN1_METHS`
* - `crypto.constants.ENGINE_METHOD_ALL`
* - `crypto.constants.ENGINE_METHOD_NONE`
*
* The flags below are deprecated in OpenSSL-1.1.0.
*
* - `crypto.constants.ENGINE_METHOD_ECDH`
* - `crypto.constants.ENGINE_METHOD_ECDSA`
* - `crypto.constants.ENGINE_METHOD_STORE`
* @since v0.11.11
* @param [flags=crypto.constants.ENGINE_METHOD_ALL]
*/
function setEngine(engine: string, flags?: number): void;
}
declare module 'node:crypto' {
export * from 'crypto';

View file

@ -1,6 +1,6 @@
{
"name": "@types/node",
"version": "14.18.21",
"version": "14.18.22",
"description": "TypeScript definitions for Node.js",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
"license": "MIT",
@ -220,6 +220,6 @@
},
"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "0e120850d2efd3c212686946890a557c78b49f575a98e7575b49a55b2ddd9e90",
"typeScriptVersion": "3.9"
"typesPublisherContentHash": "b495f890b1a6f312d85381156410dad61b7c727726953839266da2804b5b1f4d",
"typeScriptVersion": "4.0"
}