@emulsify/cli 1.11.4 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node_modules/.package-lock.json +34 -24
- package/dist/node_modules/@types/node/README.md +2 -2
- package/dist/node_modules/@types/node/assert.d.ts +23 -1
- package/dist/node_modules/@types/node/async_hooks.d.ts +64 -0
- package/dist/node_modules/@types/node/buffer.buffer.d.ts +124 -38
- package/dist/node_modules/@types/node/buffer.d.ts +19 -17
- package/dist/node_modules/@types/node/child_process.d.ts +88 -161
- package/dist/node_modules/@types/node/cluster.d.ts +5 -6
- package/dist/node_modules/@types/node/constants.d.ts +14 -12
- package/dist/node_modules/@types/node/crypto.d.ts +237 -166
- package/dist/node_modules/@types/node/dgram.d.ts +15 -14
- package/dist/node_modules/@types/node/diagnostics_channel.d.ts +39 -15
- package/dist/node_modules/@types/node/dns/promises.d.ts +11 -9
- package/dist/node_modules/@types/node/dns.d.ts +28 -21
- package/dist/node_modules/@types/node/events.d.ts +81 -35
- package/dist/node_modules/@types/node/fs/promises.d.ts +61 -36
- package/dist/node_modules/@types/node/fs.d.ts +251 -193
- package/dist/node_modules/@types/node/globals.d.ts +146 -442
- package/dist/node_modules/@types/node/globals.typedarray.d.ts +17 -0
- package/dist/node_modules/@types/node/http.d.ts +136 -31
- package/dist/node_modules/@types/node/http2.d.ts +102 -26
- package/dist/node_modules/@types/node/https.d.ts +94 -60
- package/dist/node_modules/@types/node/index.d.ts +5 -3
- package/dist/node_modules/@types/node/{inspector.d.ts → inspector.generated.d.ts} +272 -2
- package/dist/node_modules/@types/node/module.d.ts +362 -138
- package/dist/node_modules/@types/node/net.d.ts +27 -20
- package/dist/node_modules/@types/node/os.d.ts +14 -3
- package/dist/node_modules/@types/node/package.json +4 -89
- package/dist/node_modules/@types/node/perf_hooks.d.ts +37 -10
- package/dist/node_modules/@types/node/process.d.ts +108 -35
- package/dist/node_modules/@types/node/querystring.d.ts +2 -3
- package/dist/node_modules/@types/node/readline/promises.d.ts +1 -1
- package/dist/node_modules/@types/node/stream/consumers.d.ts +33 -7
- package/dist/node_modules/@types/node/stream/web.d.ts +13 -4
- package/dist/node_modules/@types/node/stream.d.ts +963 -1014
- package/dist/node_modules/@types/node/string_decoder.d.ts +2 -2
- package/dist/node_modules/@types/node/test.d.ts +1504 -1655
- package/dist/node_modules/@types/node/timers/promises.d.ts +28 -17
- package/dist/node_modules/@types/node/timers.d.ts +157 -111
- package/dist/node_modules/@types/node/tls.d.ts +105 -67
- package/dist/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +120 -37
- package/dist/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +15 -0
- package/dist/node_modules/@types/node/ts5.6/index.d.ts +5 -3
- package/dist/node_modules/@types/node/url.d.ts +10 -1
- package/dist/node_modules/@types/node/util.d.ts +28 -3
- package/dist/node_modules/@types/node/v8.d.ts +6 -5
- package/dist/node_modules/@types/node/vm.d.ts +147 -68
- package/dist/node_modules/@types/node/wasi.d.ts +1 -1
- package/dist/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/dist/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/dist/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/dist/node_modules/@types/node/web-globals/fetch.d.ts +46 -0
- package/dist/node_modules/@types/node/worker_threads.d.ts +60 -39
- package/dist/node_modules/@types/node/zlib.d.ts +21 -20
- package/dist/node_modules/debug/package.json +7 -3
- package/dist/node_modules/debug/src/browser.js +2 -1
- package/dist/node_modules/debug/src/common.js +57 -39
- package/dist/node_modules/fast-uri/.github/dependabot.yml +1 -1
- package/dist/node_modules/fast-uri/.github/workflows/ci.yml +81 -3
- package/dist/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +6 -2
- package/dist/node_modules/fast-uri/LICENSE +3 -1
- package/dist/node_modules/fast-uri/README.md +55 -37
- package/dist/node_modules/fast-uri/benchmark/benchmark.mjs +159 -0
- package/dist/node_modules/fast-uri/benchmark/equal.mjs +51 -0
- package/dist/node_modules/fast-uri/benchmark/non-simple-domain.mjs +22 -0
- package/dist/node_modules/fast-uri/benchmark/package.json +17 -0
- package/dist/node_modules/fast-uri/benchmark/string-array-to-hex-stripped.mjs +24 -0
- package/dist/node_modules/fast-uri/benchmark/ws-is-secure.mjs +65 -0
- package/dist/node_modules/fast-uri/eslint.config.js +6 -0
- package/dist/node_modules/fast-uri/index.js +98 -61
- package/dist/node_modules/fast-uri/lib/schemes.js +160 -81
- package/dist/node_modules/fast-uri/lib/utils.js +217 -123
- package/dist/node_modules/fast-uri/package.json +44 -14
- package/dist/node_modules/fast-uri/test/ajv.test.js +7 -3
- package/dist/node_modules/fast-uri/test/equal.test.js +7 -2
- package/dist/node_modules/fast-uri/test/fixtures/uri-js-parse.json +501 -0
- package/dist/node_modules/fast-uri/test/fixtures/uri-js-serialize.json +120 -0
- package/dist/node_modules/fast-uri/test/parse.test.js +31 -31
- package/dist/node_modules/fast-uri/test/resolve.test.js +52 -49
- package/dist/node_modules/fast-uri/test/rfc-3986.test.js +90 -0
- package/dist/node_modules/fast-uri/test/serialize.test.js +55 -47
- package/dist/node_modules/fast-uri/test/uri-js-compatibility.test.js +33 -0
- package/dist/node_modules/fast-uri/test/uri-js.test.js +230 -230
- package/dist/node_modules/fast-uri/test/util.test.js +23 -8
- package/dist/node_modules/fast-uri/tsconfig.json +9 -0
- package/dist/node_modules/fast-uri/types/index.d.ts +16 -9
- package/dist/node_modules/fast-uri/types/index.test-d.ts +9 -9
- package/dist/node_modules/fs-extra/LICENSE +1 -1
- package/dist/node_modules/fs-extra/README.md +3 -1
- package/dist/node_modules/fs-extra/lib/copy/copy-sync.js +11 -1
- package/dist/node_modules/fs-extra/lib/copy/copy.js +13 -15
- package/dist/node_modules/fs-extra/lib/fs/index.js +6 -0
- package/dist/node_modules/fs-extra/lib/util/async.js +29 -0
- package/dist/node_modules/fs-extra/lib/util/stat.js +2 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/jsonfile/README.md +1 -1
- package/dist/node_modules/jsonfile/index.js +3 -3
- package/dist/node_modules/jsonfile/package.json +1 -1
- package/dist/node_modules/simple-git/dist/cjs/index.js +235 -235
- package/dist/node_modules/simple-git/dist/cjs/index.js.map +3 -3
- package/dist/node_modules/simple-git/dist/esm/index.js +229 -233
- package/dist/node_modules/simple-git/dist/esm/index.js.map +3 -3
- package/dist/node_modules/simple-git/dist/src/lib/git-logger.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-branch.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/plugins/error-detection.plugin.d.ts +2 -3
- package/dist/node_modules/simple-git/dist/src/lib/plugins/simple-git-plugin.d.ts +2 -3
- package/dist/node_modules/simple-git/dist/src/lib/plugins/spawn-options-plugin.d.ts +0 -1
- package/dist/node_modules/simple-git/dist/src/lib/runners/scheduler.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/runners/tasks-pending-queue.d.ts +2 -2
- package/dist/node_modules/simple-git/dist/src/lib/tasks/apply-patch.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/tasks/clean.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/tasks/clone.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/tasks/log.d.ts +3 -3
- package/dist/node_modules/simple-git/dist/src/lib/tasks/push.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/tasks/remote.d.ts +4 -2
- package/dist/node_modules/simple-git/dist/src/lib/tasks/reset.d.ts +3 -3
- package/dist/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/tasks/task.d.ts +2 -2
- package/dist/node_modules/simple-git/dist/src/lib/types/handlers.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/types/index.d.ts +9 -13
- package/dist/node_modules/simple-git/dist/src/lib/types/tasks.d.ts +5 -6
- package/dist/node_modules/simple-git/dist/src/lib/utils/argument-filters.d.ts +5 -7
- package/dist/node_modules/simple-git/dist/src/lib/utils/git-output-streams.d.ts +0 -1
- package/dist/node_modules/simple-git/dist/src/lib/utils/line-parser.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/utils/task-options.d.ts +1 -1
- package/dist/node_modules/simple-git/dist/src/lib/utils/util.d.ts +11 -10
- package/dist/node_modules/simple-git/package.json +6 -6
- package/dist/node_modules/simple-git/readme.md +8 -0
- package/dist/node_modules/undici-types/dispatcher.d.ts +1 -0
- package/dist/node_modules/undici-types/eventsource.d.ts +0 -2
- package/dist/node_modules/undici-types/filereader.d.ts +1 -1
- package/dist/node_modules/undici-types/interceptors.d.ts +3 -1
- package/dist/node_modules/undici-types/package.json +1 -1
- package/dist/node_modules/undici-types/patch.d.ts +0 -38
- package/dist/node_modules/undici-types/readable.d.ts +5 -0
- package/dist/node_modules/undici-types/webidl.d.ts +6 -0
- package/dist/node_modules/undici-types/websocket.d.ts +0 -2
- package/dist/package-lock.json +911 -812
- package/dist/package.json +1 -1
- package/dist/util/getAvailableStarters.js +2 -2
- package/package.json +1 -1
- package/dist/node_modules/@types/node/dom-events.d.ts +0 -124
- package/dist/node_modules/fast-uri/benchmark.js +0 -105
- package/dist/node_modules/fast-uri/lib/scopedChars.js +0 -30
- package/dist/node_modules/fast-uri/test/.gitkeep +0 -0
- package/dist/node_modules/fast-uri/test/compatibility.test.js +0 -131
- package/dist/node_modules/jsonfile/CHANGELOG.md +0 -171
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/crypto.js)
|
|
18
18
|
*/
|
|
19
19
|
declare module "crypto" {
|
|
20
|
+
import { NonSharedBuffer } from "node:buffer";
|
|
20
21
|
import * as stream from "node:stream";
|
|
21
22
|
import { PeerCertificate } from "node:tls";
|
|
22
23
|
/**
|
|
@@ -44,7 +45,7 @@ declare module "crypto" {
|
|
|
44
45
|
* @param encoding The `encoding` of the `spkac` string.
|
|
45
46
|
* @return The challenge component of the `spkac` data structure, which includes a public key and a challenge.
|
|
46
47
|
*/
|
|
47
|
-
static exportChallenge(spkac: BinaryLike):
|
|
48
|
+
static exportChallenge(spkac: BinaryLike): NonSharedBuffer;
|
|
48
49
|
/**
|
|
49
50
|
* ```js
|
|
50
51
|
* const { Certificate } = await import('node:crypto');
|
|
@@ -57,7 +58,7 @@ declare module "crypto" {
|
|
|
57
58
|
* @param encoding The `encoding` of the `spkac` string.
|
|
58
59
|
* @return The public key component of the `spkac` data structure, which includes a public key and a challenge.
|
|
59
60
|
*/
|
|
60
|
-
static exportPublicKey(spkac: BinaryLike, encoding?: string):
|
|
61
|
+
static exportPublicKey(spkac: BinaryLike, encoding?: string): NonSharedBuffer;
|
|
61
62
|
/**
|
|
62
63
|
* ```js
|
|
63
64
|
* import { Buffer } from 'node:buffer';
|
|
@@ -78,7 +79,7 @@ declare module "crypto" {
|
|
|
78
79
|
* @returns The challenge component of the `spkac` data structure,
|
|
79
80
|
* which includes a public key and a challenge.
|
|
80
81
|
*/
|
|
81
|
-
exportChallenge(spkac: BinaryLike):
|
|
82
|
+
exportChallenge(spkac: BinaryLike): NonSharedBuffer;
|
|
82
83
|
/**
|
|
83
84
|
* @deprecated
|
|
84
85
|
* @param spkac
|
|
@@ -86,7 +87,7 @@ declare module "crypto" {
|
|
|
86
87
|
* @returns The public key component of the `spkac` data structure,
|
|
87
88
|
* which includes a public key and a challenge.
|
|
88
89
|
*/
|
|
89
|
-
exportPublicKey(spkac: BinaryLike, encoding?: string):
|
|
90
|
+
exportPublicKey(spkac: BinaryLike, encoding?: string): NonSharedBuffer;
|
|
90
91
|
/**
|
|
91
92
|
* @deprecated
|
|
92
93
|
* @param spkac
|
|
@@ -402,7 +403,7 @@ declare module "crypto" {
|
|
|
402
403
|
* @since v0.1.92
|
|
403
404
|
* @param encoding The `encoding` of the return value.
|
|
404
405
|
*/
|
|
405
|
-
digest():
|
|
406
|
+
digest(): NonSharedBuffer;
|
|
406
407
|
digest(encoding: BinaryToTextEncoding): string;
|
|
407
408
|
}
|
|
408
409
|
/**
|
|
@@ -496,7 +497,7 @@ declare module "crypto" {
|
|
|
496
497
|
* @since v0.1.94
|
|
497
498
|
* @param encoding The `encoding` of the return value.
|
|
498
499
|
*/
|
|
499
|
-
digest():
|
|
500
|
+
digest(): NonSharedBuffer;
|
|
500
501
|
digest(encoding: BinaryToTextEncoding): string;
|
|
501
502
|
}
|
|
502
503
|
type KeyObjectType = "secret" | "public" | "private";
|
|
@@ -510,50 +511,50 @@ declare module "crypto" {
|
|
|
510
511
|
format: "jwk";
|
|
511
512
|
}
|
|
512
513
|
interface JsonWebKey {
|
|
513
|
-
crv?: string
|
|
514
|
-
d?: string
|
|
515
|
-
dp?: string
|
|
516
|
-
dq?: string
|
|
517
|
-
e?: string
|
|
518
|
-
k?: string
|
|
519
|
-
kty?: string
|
|
520
|
-
n?: string
|
|
521
|
-
p?: string
|
|
522
|
-
q?: string
|
|
523
|
-
qi?: string
|
|
524
|
-
x?: string
|
|
525
|
-
y?: string
|
|
514
|
+
crv?: string;
|
|
515
|
+
d?: string;
|
|
516
|
+
dp?: string;
|
|
517
|
+
dq?: string;
|
|
518
|
+
e?: string;
|
|
519
|
+
k?: string;
|
|
520
|
+
kty?: string;
|
|
521
|
+
n?: string;
|
|
522
|
+
p?: string;
|
|
523
|
+
q?: string;
|
|
524
|
+
qi?: string;
|
|
525
|
+
x?: string;
|
|
526
|
+
y?: string;
|
|
526
527
|
[key: string]: unknown;
|
|
527
528
|
}
|
|
528
529
|
interface AsymmetricKeyDetails {
|
|
529
530
|
/**
|
|
530
531
|
* Key size in bits (RSA, DSA).
|
|
531
532
|
*/
|
|
532
|
-
modulusLength?: number
|
|
533
|
+
modulusLength?: number;
|
|
533
534
|
/**
|
|
534
535
|
* Public exponent (RSA).
|
|
535
536
|
*/
|
|
536
|
-
publicExponent?: bigint
|
|
537
|
+
publicExponent?: bigint;
|
|
537
538
|
/**
|
|
538
539
|
* Name of the message digest (RSA-PSS).
|
|
539
540
|
*/
|
|
540
|
-
hashAlgorithm?: string
|
|
541
|
+
hashAlgorithm?: string;
|
|
541
542
|
/**
|
|
542
543
|
* Name of the message digest used by MGF1 (RSA-PSS).
|
|
543
544
|
*/
|
|
544
|
-
mgf1HashAlgorithm?: string
|
|
545
|
+
mgf1HashAlgorithm?: string;
|
|
545
546
|
/**
|
|
546
547
|
* Minimal salt length in bytes (RSA-PSS).
|
|
547
548
|
*/
|
|
548
|
-
saltLength?: number
|
|
549
|
+
saltLength?: number;
|
|
549
550
|
/**
|
|
550
551
|
* Size of q in bits (DSA).
|
|
551
552
|
*/
|
|
552
|
-
divisorLength?: number
|
|
553
|
+
divisorLength?: number;
|
|
553
554
|
/**
|
|
554
555
|
* Name of the curve (EC).
|
|
555
556
|
*/
|
|
556
|
-
namedCurve?: string
|
|
557
|
+
namedCurve?: string;
|
|
557
558
|
}
|
|
558
559
|
/**
|
|
559
560
|
* Node.js uses a `KeyObject` class to represent a symmetric or asymmetric key,
|
|
@@ -608,7 +609,7 @@ declare module "crypto" {
|
|
|
608
609
|
* keys.
|
|
609
610
|
* @since v11.6.0
|
|
610
611
|
*/
|
|
611
|
-
asymmetricKeyType?: KeyType
|
|
612
|
+
asymmetricKeyType?: KeyType;
|
|
612
613
|
/**
|
|
613
614
|
* This property exists only on asymmetric keys. Depending on the type of the key,
|
|
614
615
|
* this object contains information about the key. None of the information obtained
|
|
@@ -622,7 +623,7 @@ declare module "crypto" {
|
|
|
622
623
|
* Other key details might be exposed via this API using additional attributes.
|
|
623
624
|
* @since v15.7.0
|
|
624
625
|
*/
|
|
625
|
-
asymmetricKeyDetails?: AsymmetricKeyDetails
|
|
626
|
+
asymmetricKeyDetails?: AsymmetricKeyDetails;
|
|
626
627
|
/**
|
|
627
628
|
* For symmetric keys, the following encoding options can be used:
|
|
628
629
|
*
|
|
@@ -646,8 +647,8 @@ declare module "crypto" {
|
|
|
646
647
|
* PKCS#1 and SEC1 encryption.
|
|
647
648
|
* @since v11.6.0
|
|
648
649
|
*/
|
|
649
|
-
export(options: KeyExportOptions<"pem">): string |
|
|
650
|
-
export(options?: KeyExportOptions<"der">):
|
|
650
|
+
export(options: KeyExportOptions<"pem">): string | NonSharedBuffer;
|
|
651
|
+
export(options?: KeyExportOptions<"der">): NonSharedBuffer;
|
|
651
652
|
export(options?: JwkKeyExportOptions): JsonWebKey;
|
|
652
653
|
/**
|
|
653
654
|
* Returns `true` or `false` depending on whether the keys have exactly the same
|
|
@@ -661,7 +662,7 @@ declare module "crypto" {
|
|
|
661
662
|
* property is `undefined` for asymmetric keys.
|
|
662
663
|
* @since v11.6.0
|
|
663
664
|
*/
|
|
664
|
-
symmetricKeySize?: number
|
|
665
|
+
symmetricKeySize?: number;
|
|
665
666
|
/**
|
|
666
667
|
* Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys
|
|
667
668
|
* or `'private'` for private (asymmetric) keys.
|
|
@@ -669,9 +670,10 @@ declare module "crypto" {
|
|
|
669
670
|
*/
|
|
670
671
|
type: KeyObjectType;
|
|
671
672
|
}
|
|
672
|
-
type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm"
|
|
673
|
+
type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm";
|
|
673
674
|
type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm";
|
|
674
675
|
type CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb";
|
|
676
|
+
type CipherChaCha20Poly1305Types = "chacha20-poly1305";
|
|
675
677
|
type BinaryLike = string | NodeJS.ArrayBufferView;
|
|
676
678
|
type CipherKey = BinaryLike | KeyObject;
|
|
677
679
|
interface CipherCCMOptions extends stream.TransformOptions {
|
|
@@ -683,6 +685,10 @@ declare module "crypto" {
|
|
|
683
685
|
interface CipherOCBOptions extends stream.TransformOptions {
|
|
684
686
|
authTagLength: number;
|
|
685
687
|
}
|
|
688
|
+
interface CipherChaCha20Poly1305Options extends stream.TransformOptions {
|
|
689
|
+
/** @default 16 */
|
|
690
|
+
authTagLength?: number | undefined;
|
|
691
|
+
}
|
|
686
692
|
/**
|
|
687
693
|
* Creates and returns a `Cipher` object that uses the given `algorithm` and `password`.
|
|
688
694
|
*
|
|
@@ -724,6 +730,14 @@ declare module "crypto" {
|
|
|
724
730
|
/** @deprecated since v10.0.0 use `createCipheriv()` */
|
|
725
731
|
function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM;
|
|
726
732
|
/** @deprecated since v10.0.0 use `createCipheriv()` */
|
|
733
|
+
function createCipher(algorithm: CipherOCBTypes, password: BinaryLike, options: CipherOCBOptions): CipherOCB;
|
|
734
|
+
/** @deprecated since v10.0.0 use `createCipheriv()` */
|
|
735
|
+
function createCipher(
|
|
736
|
+
algorithm: CipherChaCha20Poly1305Types,
|
|
737
|
+
password: BinaryLike,
|
|
738
|
+
options?: CipherChaCha20Poly1305Options,
|
|
739
|
+
): CipherChaCha20Poly1305;
|
|
740
|
+
/** @deprecated since v10.0.0 use `createCipheriv()` */
|
|
727
741
|
function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher;
|
|
728
742
|
/**
|
|
729
743
|
* Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
|
|
@@ -773,6 +787,12 @@ declare module "crypto" {
|
|
|
773
787
|
iv: BinaryLike,
|
|
774
788
|
options?: CipherGCMOptions,
|
|
775
789
|
): CipherGCM;
|
|
790
|
+
function createCipheriv(
|
|
791
|
+
algorithm: CipherChaCha20Poly1305Types,
|
|
792
|
+
key: CipherKey,
|
|
793
|
+
iv: BinaryLike,
|
|
794
|
+
options?: CipherChaCha20Poly1305Options,
|
|
795
|
+
): CipherChaCha20Poly1305;
|
|
776
796
|
function createCipheriv(
|
|
777
797
|
algorithm: string,
|
|
778
798
|
key: CipherKey,
|
|
@@ -914,8 +934,8 @@ declare module "crypto" {
|
|
|
914
934
|
* @param inputEncoding The `encoding` of the data.
|
|
915
935
|
* @param outputEncoding The `encoding` of the return value.
|
|
916
936
|
*/
|
|
917
|
-
update(data: BinaryLike):
|
|
918
|
-
update(data: string, inputEncoding: Encoding):
|
|
937
|
+
update(data: BinaryLike): NonSharedBuffer;
|
|
938
|
+
update(data: string, inputEncoding: Encoding): NonSharedBuffer;
|
|
919
939
|
update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
|
|
920
940
|
update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
|
|
921
941
|
/**
|
|
@@ -926,7 +946,7 @@ declare module "crypto" {
|
|
|
926
946
|
* @param outputEncoding The `encoding` of the return value.
|
|
927
947
|
* @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
|
|
928
948
|
*/
|
|
929
|
-
final():
|
|
949
|
+
final(): NonSharedBuffer;
|
|
930
950
|
final(outputEncoding: BufferEncoding): string;
|
|
931
951
|
/**
|
|
932
952
|
* When using block encryption algorithms, the `Cipher` class will automatically
|
|
@@ -952,7 +972,7 @@ declare module "crypto" {
|
|
|
952
972
|
plaintextLength: number;
|
|
953
973
|
},
|
|
954
974
|
): this;
|
|
955
|
-
getAuthTag():
|
|
975
|
+
getAuthTag(): NonSharedBuffer;
|
|
956
976
|
}
|
|
957
977
|
interface CipherGCM extends Cipher {
|
|
958
978
|
setAAD(
|
|
@@ -961,7 +981,7 @@ declare module "crypto" {
|
|
|
961
981
|
plaintextLength: number;
|
|
962
982
|
},
|
|
963
983
|
): this;
|
|
964
|
-
getAuthTag():
|
|
984
|
+
getAuthTag(): NonSharedBuffer;
|
|
965
985
|
}
|
|
966
986
|
interface CipherOCB extends Cipher {
|
|
967
987
|
setAAD(
|
|
@@ -970,7 +990,16 @@ declare module "crypto" {
|
|
|
970
990
|
plaintextLength: number;
|
|
971
991
|
},
|
|
972
992
|
): this;
|
|
973
|
-
getAuthTag():
|
|
993
|
+
getAuthTag(): NonSharedBuffer;
|
|
994
|
+
}
|
|
995
|
+
interface CipherChaCha20Poly1305 extends Cipher {
|
|
996
|
+
setAAD(
|
|
997
|
+
buffer: NodeJS.ArrayBufferView,
|
|
998
|
+
options: {
|
|
999
|
+
plaintextLength: number;
|
|
1000
|
+
},
|
|
1001
|
+
): this;
|
|
1002
|
+
getAuthTag(): NonSharedBuffer;
|
|
974
1003
|
}
|
|
975
1004
|
/**
|
|
976
1005
|
* Creates and returns a `Decipher` object that uses the given `algorithm` and `password` (key).
|
|
@@ -1002,6 +1031,14 @@ declare module "crypto" {
|
|
|
1002
1031
|
/** @deprecated since v10.0.0 use `createDecipheriv()` */
|
|
1003
1032
|
function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
|
|
1004
1033
|
/** @deprecated since v10.0.0 use `createDecipheriv()` */
|
|
1034
|
+
function createDecipher(algorithm: CipherOCBTypes, password: BinaryLike, options: CipherOCBOptions): DecipherOCB;
|
|
1035
|
+
/** @deprecated since v10.0.0 use `createDecipheriv()` */
|
|
1036
|
+
function createDecipher(
|
|
1037
|
+
algorithm: CipherChaCha20Poly1305Types,
|
|
1038
|
+
password: BinaryLike,
|
|
1039
|
+
options?: CipherChaCha20Poly1305Options,
|
|
1040
|
+
): DecipherChaCha20Poly1305;
|
|
1041
|
+
/** @deprecated since v10.0.0 use `createDecipheriv()` */
|
|
1005
1042
|
function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
|
|
1006
1043
|
/**
|
|
1007
1044
|
* Creates and returns a `Decipher` object that uses the given `algorithm`, `key` and initialization vector (`iv`).
|
|
@@ -1050,6 +1087,12 @@ declare module "crypto" {
|
|
|
1050
1087
|
iv: BinaryLike,
|
|
1051
1088
|
options?: CipherGCMOptions,
|
|
1052
1089
|
): DecipherGCM;
|
|
1090
|
+
function createDecipheriv(
|
|
1091
|
+
algorithm: CipherChaCha20Poly1305Types,
|
|
1092
|
+
key: CipherKey,
|
|
1093
|
+
iv: BinaryLike,
|
|
1094
|
+
options?: CipherChaCha20Poly1305Options,
|
|
1095
|
+
): DecipherChaCha20Poly1305;
|
|
1053
1096
|
function createDecipheriv(
|
|
1054
1097
|
algorithm: string,
|
|
1055
1098
|
key: CipherKey,
|
|
@@ -1180,8 +1223,8 @@ declare module "crypto" {
|
|
|
1180
1223
|
* @param inputEncoding The `encoding` of the `data` string.
|
|
1181
1224
|
* @param outputEncoding The `encoding` of the return value.
|
|
1182
1225
|
*/
|
|
1183
|
-
update(data: NodeJS.ArrayBufferView):
|
|
1184
|
-
update(data: string, inputEncoding: Encoding):
|
|
1226
|
+
update(data: NodeJS.ArrayBufferView): NonSharedBuffer;
|
|
1227
|
+
update(data: string, inputEncoding: Encoding): NonSharedBuffer;
|
|
1185
1228
|
update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
|
|
1186
1229
|
update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
|
|
1187
1230
|
/**
|
|
@@ -1192,7 +1235,7 @@ declare module "crypto" {
|
|
|
1192
1235
|
* @param outputEncoding The `encoding` of the return value.
|
|
1193
1236
|
* @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
|
|
1194
1237
|
*/
|
|
1195
|
-
final():
|
|
1238
|
+
final(): NonSharedBuffer;
|
|
1196
1239
|
final(outputEncoding: BufferEncoding): string;
|
|
1197
1240
|
/**
|
|
1198
1241
|
* When data has been encrypted without standard block padding, calling `decipher.setAutoPadding(false)` will disable automatic padding to prevent `decipher.final()` from checking for and
|
|
@@ -1235,6 +1278,15 @@ declare module "crypto" {
|
|
|
1235
1278
|
},
|
|
1236
1279
|
): this;
|
|
1237
1280
|
}
|
|
1281
|
+
interface DecipherChaCha20Poly1305 extends Decipher {
|
|
1282
|
+
setAuthTag(buffer: NodeJS.ArrayBufferView): this;
|
|
1283
|
+
setAAD(
|
|
1284
|
+
buffer: NodeJS.ArrayBufferView,
|
|
1285
|
+
options: {
|
|
1286
|
+
plaintextLength: number;
|
|
1287
|
+
},
|
|
1288
|
+
): this;
|
|
1289
|
+
}
|
|
1238
1290
|
interface PrivateKeyInput {
|
|
1239
1291
|
key: string | Buffer;
|
|
1240
1292
|
format?: KeyFormat | undefined;
|
|
@@ -1455,7 +1507,7 @@ declare module "crypto" {
|
|
|
1455
1507
|
* called. Multiple calls to `sign.sign()` will result in an error being thrown.
|
|
1456
1508
|
* @since v0.1.92
|
|
1457
1509
|
*/
|
|
1458
|
-
sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput):
|
|
1510
|
+
sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput): NonSharedBuffer;
|
|
1459
1511
|
sign(
|
|
1460
1512
|
privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
|
|
1461
1513
|
outputFormat: BinaryToTextEncoding,
|
|
@@ -1614,7 +1666,7 @@ declare module "crypto" {
|
|
|
1614
1666
|
* @since v0.5.0
|
|
1615
1667
|
* @param encoding The `encoding` of the return value.
|
|
1616
1668
|
*/
|
|
1617
|
-
generateKeys():
|
|
1669
|
+
generateKeys(): NonSharedBuffer;
|
|
1618
1670
|
generateKeys(encoding: BinaryToTextEncoding): string;
|
|
1619
1671
|
/**
|
|
1620
1672
|
* Computes the shared secret using `otherPublicKey` as the other
|
|
@@ -1629,8 +1681,16 @@ declare module "crypto" {
|
|
|
1629
1681
|
* @param inputEncoding The `encoding` of an `otherPublicKey` string.
|
|
1630
1682
|
* @param outputEncoding The `encoding` of the return value.
|
|
1631
1683
|
*/
|
|
1632
|
-
computeSecret(
|
|
1633
|
-
|
|
1684
|
+
computeSecret(
|
|
1685
|
+
otherPublicKey: NodeJS.ArrayBufferView,
|
|
1686
|
+
inputEncoding?: null,
|
|
1687
|
+
outputEncoding?: null,
|
|
1688
|
+
): NonSharedBuffer;
|
|
1689
|
+
computeSecret(
|
|
1690
|
+
otherPublicKey: string,
|
|
1691
|
+
inputEncoding: BinaryToTextEncoding,
|
|
1692
|
+
outputEncoding?: null,
|
|
1693
|
+
): NonSharedBuffer;
|
|
1634
1694
|
computeSecret(
|
|
1635
1695
|
otherPublicKey: NodeJS.ArrayBufferView,
|
|
1636
1696
|
inputEncoding: null,
|
|
@@ -1648,7 +1708,7 @@ declare module "crypto" {
|
|
|
1648
1708
|
* @since v0.5.0
|
|
1649
1709
|
* @param encoding The `encoding` of the return value.
|
|
1650
1710
|
*/
|
|
1651
|
-
getPrime():
|
|
1711
|
+
getPrime(): NonSharedBuffer;
|
|
1652
1712
|
getPrime(encoding: BinaryToTextEncoding): string;
|
|
1653
1713
|
/**
|
|
1654
1714
|
* Returns the Diffie-Hellman generator in the specified `encoding`.
|
|
@@ -1657,7 +1717,7 @@ declare module "crypto" {
|
|
|
1657
1717
|
* @since v0.5.0
|
|
1658
1718
|
* @param encoding The `encoding` of the return value.
|
|
1659
1719
|
*/
|
|
1660
|
-
getGenerator():
|
|
1720
|
+
getGenerator(): NonSharedBuffer;
|
|
1661
1721
|
getGenerator(encoding: BinaryToTextEncoding): string;
|
|
1662
1722
|
/**
|
|
1663
1723
|
* Returns the Diffie-Hellman public key in the specified `encoding`.
|
|
@@ -1666,7 +1726,7 @@ declare module "crypto" {
|
|
|
1666
1726
|
* @since v0.5.0
|
|
1667
1727
|
* @param encoding The `encoding` of the return value.
|
|
1668
1728
|
*/
|
|
1669
|
-
getPublicKey():
|
|
1729
|
+
getPublicKey(): NonSharedBuffer;
|
|
1670
1730
|
getPublicKey(encoding: BinaryToTextEncoding): string;
|
|
1671
1731
|
/**
|
|
1672
1732
|
* Returns the Diffie-Hellman private key in the specified `encoding`.
|
|
@@ -1675,7 +1735,7 @@ declare module "crypto" {
|
|
|
1675
1735
|
* @since v0.5.0
|
|
1676
1736
|
* @param encoding The `encoding` of the return value.
|
|
1677
1737
|
*/
|
|
1678
|
-
getPrivateKey():
|
|
1738
|
+
getPrivateKey(): NonSharedBuffer;
|
|
1679
1739
|
getPrivateKey(encoding: BinaryToTextEncoding): string;
|
|
1680
1740
|
/**
|
|
1681
1741
|
* Sets the Diffie-Hellman public key. If the `encoding` argument is provided, `publicKey` is expected
|
|
@@ -1819,7 +1879,7 @@ declare module "crypto" {
|
|
|
1819
1879
|
iterations: number,
|
|
1820
1880
|
keylen: number,
|
|
1821
1881
|
digest: string,
|
|
1822
|
-
callback: (err: Error | null, derivedKey:
|
|
1882
|
+
callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
|
|
1823
1883
|
): void;
|
|
1824
1884
|
/**
|
|
1825
1885
|
* Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2)
|
|
@@ -1856,7 +1916,7 @@ declare module "crypto" {
|
|
|
1856
1916
|
iterations: number,
|
|
1857
1917
|
keylen: number,
|
|
1858
1918
|
digest: string,
|
|
1859
|
-
):
|
|
1919
|
+
): NonSharedBuffer;
|
|
1860
1920
|
/**
|
|
1861
1921
|
* Generates cryptographically strong pseudorandom data. The `size` argument
|
|
1862
1922
|
* is a number indicating the number of bytes to generate.
|
|
@@ -1909,10 +1969,10 @@ declare module "crypto" {
|
|
|
1909
1969
|
* @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`.
|
|
1910
1970
|
* @return if the `callback` function is not provided.
|
|
1911
1971
|
*/
|
|
1912
|
-
function randomBytes(size: number):
|
|
1913
|
-
function randomBytes(size: number, callback: (err: Error | null, buf:
|
|
1914
|
-
function pseudoRandomBytes(size: number):
|
|
1915
|
-
function pseudoRandomBytes(size: number, callback: (err: Error | null, buf:
|
|
1972
|
+
function randomBytes(size: number): NonSharedBuffer;
|
|
1973
|
+
function randomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void;
|
|
1974
|
+
function pseudoRandomBytes(size: number): NonSharedBuffer;
|
|
1975
|
+
function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void;
|
|
1916
1976
|
/**
|
|
1917
1977
|
* Return a random integer `n` such that `min <= n < max`. This
|
|
1918
1978
|
* implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias).
|
|
@@ -2142,14 +2202,14 @@ declare module "crypto" {
|
|
|
2142
2202
|
password: BinaryLike,
|
|
2143
2203
|
salt: BinaryLike,
|
|
2144
2204
|
keylen: number,
|
|
2145
|
-
callback: (err: Error | null, derivedKey:
|
|
2205
|
+
callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
|
|
2146
2206
|
): void;
|
|
2147
2207
|
function scrypt(
|
|
2148
2208
|
password: BinaryLike,
|
|
2149
2209
|
salt: BinaryLike,
|
|
2150
2210
|
keylen: number,
|
|
2151
2211
|
options: ScryptOptions,
|
|
2152
|
-
callback: (err: Error | null, derivedKey:
|
|
2212
|
+
callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
|
|
2153
2213
|
): void;
|
|
2154
2214
|
/**
|
|
2155
2215
|
* Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
|
|
@@ -2181,7 +2241,12 @@ declare module "crypto" {
|
|
|
2181
2241
|
* ```
|
|
2182
2242
|
* @since v10.5.0
|
|
2183
2243
|
*/
|
|
2184
|
-
function scryptSync(
|
|
2244
|
+
function scryptSync(
|
|
2245
|
+
password: BinaryLike,
|
|
2246
|
+
salt: BinaryLike,
|
|
2247
|
+
keylen: number,
|
|
2248
|
+
options?: ScryptOptions,
|
|
2249
|
+
): NonSharedBuffer;
|
|
2185
2250
|
interface RsaPublicKey {
|
|
2186
2251
|
key: KeyLike;
|
|
2187
2252
|
padding?: number | undefined;
|
|
@@ -2207,7 +2272,10 @@ declare module "crypto" {
|
|
|
2207
2272
|
* be passed instead of a public key.
|
|
2208
2273
|
* @since v0.11.14
|
|
2209
2274
|
*/
|
|
2210
|
-
function publicEncrypt(
|
|
2275
|
+
function publicEncrypt(
|
|
2276
|
+
key: RsaPublicKey | RsaPrivateKey | KeyLike,
|
|
2277
|
+
buffer: NodeJS.ArrayBufferView,
|
|
2278
|
+
): NonSharedBuffer;
|
|
2211
2279
|
/**
|
|
2212
2280
|
* Decrypts `buffer` with `key`.`buffer` was previously encrypted using
|
|
2213
2281
|
* the corresponding private key, for example using {@link privateEncrypt}.
|
|
@@ -2219,7 +2287,10 @@ declare module "crypto" {
|
|
|
2219
2287
|
* be passed instead of a public key.
|
|
2220
2288
|
* @since v1.1.0
|
|
2221
2289
|
*/
|
|
2222
|
-
function publicDecrypt(
|
|
2290
|
+
function publicDecrypt(
|
|
2291
|
+
key: RsaPublicKey | RsaPrivateKey | KeyLike,
|
|
2292
|
+
buffer: NodeJS.ArrayBufferView,
|
|
2293
|
+
): NonSharedBuffer;
|
|
2223
2294
|
/**
|
|
2224
2295
|
* Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using
|
|
2225
2296
|
* the corresponding public key, for example using {@link publicEncrypt}.
|
|
@@ -2228,7 +2299,7 @@ declare module "crypto" {
|
|
|
2228
2299
|
* object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`.
|
|
2229
2300
|
* @since v0.11.14
|
|
2230
2301
|
*/
|
|
2231
|
-
function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView):
|
|
2302
|
+
function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): NonSharedBuffer;
|
|
2232
2303
|
/**
|
|
2233
2304
|
* Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
|
|
2234
2305
|
* the corresponding public key, for example using {@link publicDecrypt}.
|
|
@@ -2237,7 +2308,7 @@ declare module "crypto" {
|
|
|
2237
2308
|
* object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`.
|
|
2238
2309
|
* @since v1.1.0
|
|
2239
2310
|
*/
|
|
2240
|
-
function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView):
|
|
2311
|
+
function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): NonSharedBuffer;
|
|
2241
2312
|
/**
|
|
2242
2313
|
* ```js
|
|
2243
2314
|
* const {
|
|
@@ -2366,7 +2437,7 @@ declare module "crypto" {
|
|
|
2366
2437
|
inputEncoding?: BinaryToTextEncoding,
|
|
2367
2438
|
outputEncoding?: "latin1" | "hex" | "base64" | "base64url",
|
|
2368
2439
|
format?: "uncompressed" | "compressed" | "hybrid",
|
|
2369
|
-
):
|
|
2440
|
+
): NonSharedBuffer | string;
|
|
2370
2441
|
/**
|
|
2371
2442
|
* Generates private and public EC Diffie-Hellman key values, and returns
|
|
2372
2443
|
* the public key in the specified `format` and `encoding`. This key should be
|
|
@@ -2379,7 +2450,7 @@ declare module "crypto" {
|
|
|
2379
2450
|
* @param encoding The `encoding` of the return value.
|
|
2380
2451
|
* @param [format='uncompressed']
|
|
2381
2452
|
*/
|
|
2382
|
-
generateKeys():
|
|
2453
|
+
generateKeys(): NonSharedBuffer;
|
|
2383
2454
|
generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
|
|
2384
2455
|
/**
|
|
2385
2456
|
* Computes the shared secret using `otherPublicKey` as the other
|
|
@@ -2398,8 +2469,8 @@ declare module "crypto" {
|
|
|
2398
2469
|
* @param inputEncoding The `encoding` of the `otherPublicKey` string.
|
|
2399
2470
|
* @param outputEncoding The `encoding` of the return value.
|
|
2400
2471
|
*/
|
|
2401
|
-
computeSecret(otherPublicKey: NodeJS.ArrayBufferView):
|
|
2402
|
-
computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding):
|
|
2472
|
+
computeSecret(otherPublicKey: NodeJS.ArrayBufferView): NonSharedBuffer;
|
|
2473
|
+
computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): NonSharedBuffer;
|
|
2403
2474
|
computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
|
|
2404
2475
|
computeSecret(
|
|
2405
2476
|
otherPublicKey: string,
|
|
@@ -2413,7 +2484,7 @@ declare module "crypto" {
|
|
|
2413
2484
|
* @param encoding The `encoding` of the return value.
|
|
2414
2485
|
* @return The EC Diffie-Hellman in the specified `encoding`.
|
|
2415
2486
|
*/
|
|
2416
|
-
getPrivateKey():
|
|
2487
|
+
getPrivateKey(): NonSharedBuffer;
|
|
2417
2488
|
getPrivateKey(encoding: BinaryToTextEncoding): string;
|
|
2418
2489
|
/**
|
|
2419
2490
|
* The `format` argument specifies point encoding and can be `'compressed'` or `'uncompressed'`. If `format` is not specified the point will be returned in`'uncompressed'` format.
|
|
@@ -2425,7 +2496,7 @@ declare module "crypto" {
|
|
|
2425
2496
|
* @param [format='uncompressed']
|
|
2426
2497
|
* @return The EC Diffie-Hellman public key in the specified `encoding` and `format`.
|
|
2427
2498
|
*/
|
|
2428
|
-
getPublicKey(encoding?: null, format?: ECDHKeyFormat):
|
|
2499
|
+
getPublicKey(encoding?: null, format?: ECDHKeyFormat): NonSharedBuffer;
|
|
2429
2500
|
getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
|
|
2430
2501
|
/**
|
|
2431
2502
|
* Sets the EC Diffie-Hellman private key.
|
|
@@ -2524,15 +2595,15 @@ declare module "crypto" {
|
|
|
2524
2595
|
/**
|
|
2525
2596
|
* Name of the message digest
|
|
2526
2597
|
*/
|
|
2527
|
-
hashAlgorithm?: string;
|
|
2598
|
+
hashAlgorithm?: string | undefined;
|
|
2528
2599
|
/**
|
|
2529
2600
|
* Name of the message digest used by MGF1
|
|
2530
2601
|
*/
|
|
2531
|
-
mgf1HashAlgorithm?: string;
|
|
2602
|
+
mgf1HashAlgorithm?: string | undefined;
|
|
2532
2603
|
/**
|
|
2533
2604
|
* Minimal salt length in bytes
|
|
2534
2605
|
*/
|
|
2535
|
-
saltLength?: string;
|
|
2606
|
+
saltLength?: string | undefined;
|
|
2536
2607
|
}
|
|
2537
2608
|
interface DSAKeyPairKeyObjectOptions {
|
|
2538
2609
|
/**
|
|
@@ -2575,15 +2646,15 @@ declare module "crypto" {
|
|
|
2575
2646
|
/**
|
|
2576
2647
|
* Name of the message digest
|
|
2577
2648
|
*/
|
|
2578
|
-
hashAlgorithm?: string;
|
|
2649
|
+
hashAlgorithm?: string | undefined;
|
|
2579
2650
|
/**
|
|
2580
2651
|
* Name of the message digest used by MGF1
|
|
2581
2652
|
*/
|
|
2582
|
-
mgf1HashAlgorithm?: string;
|
|
2653
|
+
mgf1HashAlgorithm?: string | undefined;
|
|
2583
2654
|
/**
|
|
2584
2655
|
* Minimal salt length in bytes
|
|
2585
2656
|
*/
|
|
2586
|
-
saltLength?: string;
|
|
2657
|
+
saltLength?: string | undefined;
|
|
2587
2658
|
publicKeyEncoding: {
|
|
2588
2659
|
type: "spki";
|
|
2589
2660
|
format: PubF;
|
|
@@ -2706,15 +2777,15 @@ declare module "crypto" {
|
|
|
2706
2777
|
function generateKeyPairSync(
|
|
2707
2778
|
type: "rsa",
|
|
2708
2779
|
options: RSAKeyPairOptions<"pem", "der">,
|
|
2709
|
-
): KeyPairSyncResult<string,
|
|
2780
|
+
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2710
2781
|
function generateKeyPairSync(
|
|
2711
2782
|
type: "rsa",
|
|
2712
2783
|
options: RSAKeyPairOptions<"der", "pem">,
|
|
2713
|
-
): KeyPairSyncResult<
|
|
2784
|
+
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2714
2785
|
function generateKeyPairSync(
|
|
2715
2786
|
type: "rsa",
|
|
2716
2787
|
options: RSAKeyPairOptions<"der", "der">,
|
|
2717
|
-
): KeyPairSyncResult<
|
|
2788
|
+
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2718
2789
|
function generateKeyPairSync(type: "rsa", options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2719
2790
|
function generateKeyPairSync(
|
|
2720
2791
|
type: "rsa-pss",
|
|
@@ -2723,15 +2794,15 @@ declare module "crypto" {
|
|
|
2723
2794
|
function generateKeyPairSync(
|
|
2724
2795
|
type: "rsa-pss",
|
|
2725
2796
|
options: RSAPSSKeyPairOptions<"pem", "der">,
|
|
2726
|
-
): KeyPairSyncResult<string,
|
|
2797
|
+
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2727
2798
|
function generateKeyPairSync(
|
|
2728
2799
|
type: "rsa-pss",
|
|
2729
2800
|
options: RSAPSSKeyPairOptions<"der", "pem">,
|
|
2730
|
-
): KeyPairSyncResult<
|
|
2801
|
+
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2731
2802
|
function generateKeyPairSync(
|
|
2732
2803
|
type: "rsa-pss",
|
|
2733
2804
|
options: RSAPSSKeyPairOptions<"der", "der">,
|
|
2734
|
-
): KeyPairSyncResult<
|
|
2805
|
+
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2735
2806
|
function generateKeyPairSync(type: "rsa-pss", options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2736
2807
|
function generateKeyPairSync(
|
|
2737
2808
|
type: "dsa",
|
|
@@ -2740,15 +2811,15 @@ declare module "crypto" {
|
|
|
2740
2811
|
function generateKeyPairSync(
|
|
2741
2812
|
type: "dsa",
|
|
2742
2813
|
options: DSAKeyPairOptions<"pem", "der">,
|
|
2743
|
-
): KeyPairSyncResult<string,
|
|
2814
|
+
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2744
2815
|
function generateKeyPairSync(
|
|
2745
2816
|
type: "dsa",
|
|
2746
2817
|
options: DSAKeyPairOptions<"der", "pem">,
|
|
2747
|
-
): KeyPairSyncResult<
|
|
2818
|
+
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2748
2819
|
function generateKeyPairSync(
|
|
2749
2820
|
type: "dsa",
|
|
2750
2821
|
options: DSAKeyPairOptions<"der", "der">,
|
|
2751
|
-
): KeyPairSyncResult<
|
|
2822
|
+
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2752
2823
|
function generateKeyPairSync(type: "dsa", options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2753
2824
|
function generateKeyPairSync(
|
|
2754
2825
|
type: "ec",
|
|
@@ -2757,15 +2828,15 @@ declare module "crypto" {
|
|
|
2757
2828
|
function generateKeyPairSync(
|
|
2758
2829
|
type: "ec",
|
|
2759
2830
|
options: ECKeyPairOptions<"pem", "der">,
|
|
2760
|
-
): KeyPairSyncResult<string,
|
|
2831
|
+
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2761
2832
|
function generateKeyPairSync(
|
|
2762
2833
|
type: "ec",
|
|
2763
2834
|
options: ECKeyPairOptions<"der", "pem">,
|
|
2764
|
-
): KeyPairSyncResult<
|
|
2835
|
+
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2765
2836
|
function generateKeyPairSync(
|
|
2766
2837
|
type: "ec",
|
|
2767
2838
|
options: ECKeyPairOptions<"der", "der">,
|
|
2768
|
-
): KeyPairSyncResult<
|
|
2839
|
+
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2769
2840
|
function generateKeyPairSync(type: "ec", options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2770
2841
|
function generateKeyPairSync(
|
|
2771
2842
|
type: "ed25519",
|
|
@@ -2774,15 +2845,15 @@ declare module "crypto" {
|
|
|
2774
2845
|
function generateKeyPairSync(
|
|
2775
2846
|
type: "ed25519",
|
|
2776
2847
|
options: ED25519KeyPairOptions<"pem", "der">,
|
|
2777
|
-
): KeyPairSyncResult<string,
|
|
2848
|
+
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2778
2849
|
function generateKeyPairSync(
|
|
2779
2850
|
type: "ed25519",
|
|
2780
2851
|
options: ED25519KeyPairOptions<"der", "pem">,
|
|
2781
|
-
): KeyPairSyncResult<
|
|
2852
|
+
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2782
2853
|
function generateKeyPairSync(
|
|
2783
2854
|
type: "ed25519",
|
|
2784
2855
|
options: ED25519KeyPairOptions<"der", "der">,
|
|
2785
|
-
): KeyPairSyncResult<
|
|
2856
|
+
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2786
2857
|
function generateKeyPairSync(type: "ed25519", options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2787
2858
|
function generateKeyPairSync(
|
|
2788
2859
|
type: "ed448",
|
|
@@ -2791,15 +2862,15 @@ declare module "crypto" {
|
|
|
2791
2862
|
function generateKeyPairSync(
|
|
2792
2863
|
type: "ed448",
|
|
2793
2864
|
options: ED448KeyPairOptions<"pem", "der">,
|
|
2794
|
-
): KeyPairSyncResult<string,
|
|
2865
|
+
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2795
2866
|
function generateKeyPairSync(
|
|
2796
2867
|
type: "ed448",
|
|
2797
2868
|
options: ED448KeyPairOptions<"der", "pem">,
|
|
2798
|
-
): KeyPairSyncResult<
|
|
2869
|
+
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2799
2870
|
function generateKeyPairSync(
|
|
2800
2871
|
type: "ed448",
|
|
2801
2872
|
options: ED448KeyPairOptions<"der", "der">,
|
|
2802
|
-
): KeyPairSyncResult<
|
|
2873
|
+
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2803
2874
|
function generateKeyPairSync(type: "ed448", options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2804
2875
|
function generateKeyPairSync(
|
|
2805
2876
|
type: "x25519",
|
|
@@ -2808,15 +2879,15 @@ declare module "crypto" {
|
|
|
2808
2879
|
function generateKeyPairSync(
|
|
2809
2880
|
type: "x25519",
|
|
2810
2881
|
options: X25519KeyPairOptions<"pem", "der">,
|
|
2811
|
-
): KeyPairSyncResult<string,
|
|
2882
|
+
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2812
2883
|
function generateKeyPairSync(
|
|
2813
2884
|
type: "x25519",
|
|
2814
2885
|
options: X25519KeyPairOptions<"der", "pem">,
|
|
2815
|
-
): KeyPairSyncResult<
|
|
2886
|
+
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2816
2887
|
function generateKeyPairSync(
|
|
2817
2888
|
type: "x25519",
|
|
2818
2889
|
options: X25519KeyPairOptions<"der", "der">,
|
|
2819
|
-
): KeyPairSyncResult<
|
|
2890
|
+
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2820
2891
|
function generateKeyPairSync(type: "x25519", options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2821
2892
|
function generateKeyPairSync(
|
|
2822
2893
|
type: "x448",
|
|
@@ -2825,15 +2896,15 @@ declare module "crypto" {
|
|
|
2825
2896
|
function generateKeyPairSync(
|
|
2826
2897
|
type: "x448",
|
|
2827
2898
|
options: X448KeyPairOptions<"pem", "der">,
|
|
2828
|
-
): KeyPairSyncResult<string,
|
|
2899
|
+
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2829
2900
|
function generateKeyPairSync(
|
|
2830
2901
|
type: "x448",
|
|
2831
2902
|
options: X448KeyPairOptions<"der", "pem">,
|
|
2832
|
-
): KeyPairSyncResult<
|
|
2903
|
+
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2833
2904
|
function generateKeyPairSync(
|
|
2834
2905
|
type: "x448",
|
|
2835
2906
|
options: X448KeyPairOptions<"der", "der">,
|
|
2836
|
-
): KeyPairSyncResult<
|
|
2907
|
+
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2837
2908
|
function generateKeyPairSync(type: "x448", options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2838
2909
|
/**
|
|
2839
2910
|
* Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
|
|
@@ -2882,17 +2953,17 @@ declare module "crypto" {
|
|
|
2882
2953
|
function generateKeyPair(
|
|
2883
2954
|
type: "rsa",
|
|
2884
2955
|
options: RSAKeyPairOptions<"pem", "der">,
|
|
2885
|
-
callback: (err: Error | null, publicKey: string, privateKey:
|
|
2956
|
+
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
2886
2957
|
): void;
|
|
2887
2958
|
function generateKeyPair(
|
|
2888
2959
|
type: "rsa",
|
|
2889
2960
|
options: RSAKeyPairOptions<"der", "pem">,
|
|
2890
|
-
callback: (err: Error | null, publicKey:
|
|
2961
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
2891
2962
|
): void;
|
|
2892
2963
|
function generateKeyPair(
|
|
2893
2964
|
type: "rsa",
|
|
2894
2965
|
options: RSAKeyPairOptions<"der", "der">,
|
|
2895
|
-
callback: (err: Error | null, publicKey:
|
|
2966
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
2896
2967
|
): void;
|
|
2897
2968
|
function generateKeyPair(
|
|
2898
2969
|
type: "rsa",
|
|
@@ -2907,17 +2978,17 @@ declare module "crypto" {
|
|
|
2907
2978
|
function generateKeyPair(
|
|
2908
2979
|
type: "rsa-pss",
|
|
2909
2980
|
options: RSAPSSKeyPairOptions<"pem", "der">,
|
|
2910
|
-
callback: (err: Error | null, publicKey: string, privateKey:
|
|
2981
|
+
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
2911
2982
|
): void;
|
|
2912
2983
|
function generateKeyPair(
|
|
2913
2984
|
type: "rsa-pss",
|
|
2914
2985
|
options: RSAPSSKeyPairOptions<"der", "pem">,
|
|
2915
|
-
callback: (err: Error | null, publicKey:
|
|
2986
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
2916
2987
|
): void;
|
|
2917
2988
|
function generateKeyPair(
|
|
2918
2989
|
type: "rsa-pss",
|
|
2919
2990
|
options: RSAPSSKeyPairOptions<"der", "der">,
|
|
2920
|
-
callback: (err: Error | null, publicKey:
|
|
2991
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
2921
2992
|
): void;
|
|
2922
2993
|
function generateKeyPair(
|
|
2923
2994
|
type: "rsa-pss",
|
|
@@ -2932,17 +3003,17 @@ declare module "crypto" {
|
|
|
2932
3003
|
function generateKeyPair(
|
|
2933
3004
|
type: "dsa",
|
|
2934
3005
|
options: DSAKeyPairOptions<"pem", "der">,
|
|
2935
|
-
callback: (err: Error | null, publicKey: string, privateKey:
|
|
3006
|
+
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
2936
3007
|
): void;
|
|
2937
3008
|
function generateKeyPair(
|
|
2938
3009
|
type: "dsa",
|
|
2939
3010
|
options: DSAKeyPairOptions<"der", "pem">,
|
|
2940
|
-
callback: (err: Error | null, publicKey:
|
|
3011
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
2941
3012
|
): void;
|
|
2942
3013
|
function generateKeyPair(
|
|
2943
3014
|
type: "dsa",
|
|
2944
3015
|
options: DSAKeyPairOptions<"der", "der">,
|
|
2945
|
-
callback: (err: Error | null, publicKey:
|
|
3016
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
2946
3017
|
): void;
|
|
2947
3018
|
function generateKeyPair(
|
|
2948
3019
|
type: "dsa",
|
|
@@ -2957,17 +3028,17 @@ declare module "crypto" {
|
|
|
2957
3028
|
function generateKeyPair(
|
|
2958
3029
|
type: "ec",
|
|
2959
3030
|
options: ECKeyPairOptions<"pem", "der">,
|
|
2960
|
-
callback: (err: Error | null, publicKey: string, privateKey:
|
|
3031
|
+
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
2961
3032
|
): void;
|
|
2962
3033
|
function generateKeyPair(
|
|
2963
3034
|
type: "ec",
|
|
2964
3035
|
options: ECKeyPairOptions<"der", "pem">,
|
|
2965
|
-
callback: (err: Error | null, publicKey:
|
|
3036
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
2966
3037
|
): void;
|
|
2967
3038
|
function generateKeyPair(
|
|
2968
3039
|
type: "ec",
|
|
2969
3040
|
options: ECKeyPairOptions<"der", "der">,
|
|
2970
|
-
callback: (err: Error | null, publicKey:
|
|
3041
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
2971
3042
|
): void;
|
|
2972
3043
|
function generateKeyPair(
|
|
2973
3044
|
type: "ec",
|
|
@@ -2982,17 +3053,17 @@ declare module "crypto" {
|
|
|
2982
3053
|
function generateKeyPair(
|
|
2983
3054
|
type: "ed25519",
|
|
2984
3055
|
options: ED25519KeyPairOptions<"pem", "der">,
|
|
2985
|
-
callback: (err: Error | null, publicKey: string, privateKey:
|
|
3056
|
+
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
2986
3057
|
): void;
|
|
2987
3058
|
function generateKeyPair(
|
|
2988
3059
|
type: "ed25519",
|
|
2989
3060
|
options: ED25519KeyPairOptions<"der", "pem">,
|
|
2990
|
-
callback: (err: Error | null, publicKey:
|
|
3061
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
2991
3062
|
): void;
|
|
2992
3063
|
function generateKeyPair(
|
|
2993
3064
|
type: "ed25519",
|
|
2994
3065
|
options: ED25519KeyPairOptions<"der", "der">,
|
|
2995
|
-
callback: (err: Error | null, publicKey:
|
|
3066
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
2996
3067
|
): void;
|
|
2997
3068
|
function generateKeyPair(
|
|
2998
3069
|
type: "ed25519",
|
|
@@ -3007,17 +3078,17 @@ declare module "crypto" {
|
|
|
3007
3078
|
function generateKeyPair(
|
|
3008
3079
|
type: "ed448",
|
|
3009
3080
|
options: ED448KeyPairOptions<"pem", "der">,
|
|
3010
|
-
callback: (err: Error | null, publicKey: string, privateKey:
|
|
3081
|
+
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
3011
3082
|
): void;
|
|
3012
3083
|
function generateKeyPair(
|
|
3013
3084
|
type: "ed448",
|
|
3014
3085
|
options: ED448KeyPairOptions<"der", "pem">,
|
|
3015
|
-
callback: (err: Error | null, publicKey:
|
|
3086
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
3016
3087
|
): void;
|
|
3017
3088
|
function generateKeyPair(
|
|
3018
3089
|
type: "ed448",
|
|
3019
3090
|
options: ED448KeyPairOptions<"der", "der">,
|
|
3020
|
-
callback: (err: Error | null, publicKey:
|
|
3091
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
3021
3092
|
): void;
|
|
3022
3093
|
function generateKeyPair(
|
|
3023
3094
|
type: "ed448",
|
|
@@ -3032,17 +3103,17 @@ declare module "crypto" {
|
|
|
3032
3103
|
function generateKeyPair(
|
|
3033
3104
|
type: "x25519",
|
|
3034
3105
|
options: X25519KeyPairOptions<"pem", "der">,
|
|
3035
|
-
callback: (err: Error | null, publicKey: string, privateKey:
|
|
3106
|
+
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
3036
3107
|
): void;
|
|
3037
3108
|
function generateKeyPair(
|
|
3038
3109
|
type: "x25519",
|
|
3039
3110
|
options: X25519KeyPairOptions<"der", "pem">,
|
|
3040
|
-
callback: (err: Error | null, publicKey:
|
|
3111
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
3041
3112
|
): void;
|
|
3042
3113
|
function generateKeyPair(
|
|
3043
3114
|
type: "x25519",
|
|
3044
3115
|
options: X25519KeyPairOptions<"der", "der">,
|
|
3045
|
-
callback: (err: Error | null, publicKey:
|
|
3116
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
3046
3117
|
): void;
|
|
3047
3118
|
function generateKeyPair(
|
|
3048
3119
|
type: "x25519",
|
|
@@ -3057,17 +3128,17 @@ declare module "crypto" {
|
|
|
3057
3128
|
function generateKeyPair(
|
|
3058
3129
|
type: "x448",
|
|
3059
3130
|
options: X448KeyPairOptions<"pem", "der">,
|
|
3060
|
-
callback: (err: Error | null, publicKey: string, privateKey:
|
|
3131
|
+
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
3061
3132
|
): void;
|
|
3062
3133
|
function generateKeyPair(
|
|
3063
3134
|
type: "x448",
|
|
3064
3135
|
options: X448KeyPairOptions<"der", "pem">,
|
|
3065
|
-
callback: (err: Error | null, publicKey:
|
|
3136
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
3066
3137
|
): void;
|
|
3067
3138
|
function generateKeyPair(
|
|
3068
3139
|
type: "x448",
|
|
3069
3140
|
options: X448KeyPairOptions<"der", "der">,
|
|
3070
|
-
callback: (err: Error | null, publicKey:
|
|
3141
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
3071
3142
|
): void;
|
|
3072
3143
|
function generateKeyPair(
|
|
3073
3144
|
type: "x448",
|
|
@@ -3087,21 +3158,21 @@ declare module "crypto" {
|
|
|
3087
3158
|
options: RSAKeyPairOptions<"pem", "der">,
|
|
3088
3159
|
): Promise<{
|
|
3089
3160
|
publicKey: string;
|
|
3090
|
-
privateKey:
|
|
3161
|
+
privateKey: NonSharedBuffer;
|
|
3091
3162
|
}>;
|
|
3092
3163
|
function __promisify__(
|
|
3093
3164
|
type: "rsa",
|
|
3094
3165
|
options: RSAKeyPairOptions<"der", "pem">,
|
|
3095
3166
|
): Promise<{
|
|
3096
|
-
publicKey:
|
|
3167
|
+
publicKey: NonSharedBuffer;
|
|
3097
3168
|
privateKey: string;
|
|
3098
3169
|
}>;
|
|
3099
3170
|
function __promisify__(
|
|
3100
3171
|
type: "rsa",
|
|
3101
3172
|
options: RSAKeyPairOptions<"der", "der">,
|
|
3102
3173
|
): Promise<{
|
|
3103
|
-
publicKey:
|
|
3104
|
-
privateKey:
|
|
3174
|
+
publicKey: NonSharedBuffer;
|
|
3175
|
+
privateKey: NonSharedBuffer;
|
|
3105
3176
|
}>;
|
|
3106
3177
|
function __promisify__(type: "rsa", options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
3107
3178
|
function __promisify__(
|
|
@@ -3116,21 +3187,21 @@ declare module "crypto" {
|
|
|
3116
3187
|
options: RSAPSSKeyPairOptions<"pem", "der">,
|
|
3117
3188
|
): Promise<{
|
|
3118
3189
|
publicKey: string;
|
|
3119
|
-
privateKey:
|
|
3190
|
+
privateKey: NonSharedBuffer;
|
|
3120
3191
|
}>;
|
|
3121
3192
|
function __promisify__(
|
|
3122
3193
|
type: "rsa-pss",
|
|
3123
3194
|
options: RSAPSSKeyPairOptions<"der", "pem">,
|
|
3124
3195
|
): Promise<{
|
|
3125
|
-
publicKey:
|
|
3196
|
+
publicKey: NonSharedBuffer;
|
|
3126
3197
|
privateKey: string;
|
|
3127
3198
|
}>;
|
|
3128
3199
|
function __promisify__(
|
|
3129
3200
|
type: "rsa-pss",
|
|
3130
3201
|
options: RSAPSSKeyPairOptions<"der", "der">,
|
|
3131
3202
|
): Promise<{
|
|
3132
|
-
publicKey:
|
|
3133
|
-
privateKey:
|
|
3203
|
+
publicKey: NonSharedBuffer;
|
|
3204
|
+
privateKey: NonSharedBuffer;
|
|
3134
3205
|
}>;
|
|
3135
3206
|
function __promisify__(
|
|
3136
3207
|
type: "rsa-pss",
|
|
@@ -3148,21 +3219,21 @@ declare module "crypto" {
|
|
|
3148
3219
|
options: DSAKeyPairOptions<"pem", "der">,
|
|
3149
3220
|
): Promise<{
|
|
3150
3221
|
publicKey: string;
|
|
3151
|
-
privateKey:
|
|
3222
|
+
privateKey: NonSharedBuffer;
|
|
3152
3223
|
}>;
|
|
3153
3224
|
function __promisify__(
|
|
3154
3225
|
type: "dsa",
|
|
3155
3226
|
options: DSAKeyPairOptions<"der", "pem">,
|
|
3156
3227
|
): Promise<{
|
|
3157
|
-
publicKey:
|
|
3228
|
+
publicKey: NonSharedBuffer;
|
|
3158
3229
|
privateKey: string;
|
|
3159
3230
|
}>;
|
|
3160
3231
|
function __promisify__(
|
|
3161
3232
|
type: "dsa",
|
|
3162
3233
|
options: DSAKeyPairOptions<"der", "der">,
|
|
3163
3234
|
): Promise<{
|
|
3164
|
-
publicKey:
|
|
3165
|
-
privateKey:
|
|
3235
|
+
publicKey: NonSharedBuffer;
|
|
3236
|
+
privateKey: NonSharedBuffer;
|
|
3166
3237
|
}>;
|
|
3167
3238
|
function __promisify__(type: "dsa", options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
3168
3239
|
function __promisify__(
|
|
@@ -3177,21 +3248,21 @@ declare module "crypto" {
|
|
|
3177
3248
|
options: ECKeyPairOptions<"pem", "der">,
|
|
3178
3249
|
): Promise<{
|
|
3179
3250
|
publicKey: string;
|
|
3180
|
-
privateKey:
|
|
3251
|
+
privateKey: NonSharedBuffer;
|
|
3181
3252
|
}>;
|
|
3182
3253
|
function __promisify__(
|
|
3183
3254
|
type: "ec",
|
|
3184
3255
|
options: ECKeyPairOptions<"der", "pem">,
|
|
3185
3256
|
): Promise<{
|
|
3186
|
-
publicKey:
|
|
3257
|
+
publicKey: NonSharedBuffer;
|
|
3187
3258
|
privateKey: string;
|
|
3188
3259
|
}>;
|
|
3189
3260
|
function __promisify__(
|
|
3190
3261
|
type: "ec",
|
|
3191
3262
|
options: ECKeyPairOptions<"der", "der">,
|
|
3192
3263
|
): Promise<{
|
|
3193
|
-
publicKey:
|
|
3194
|
-
privateKey:
|
|
3264
|
+
publicKey: NonSharedBuffer;
|
|
3265
|
+
privateKey: NonSharedBuffer;
|
|
3195
3266
|
}>;
|
|
3196
3267
|
function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
3197
3268
|
function __promisify__(
|
|
@@ -3206,21 +3277,21 @@ declare module "crypto" {
|
|
|
3206
3277
|
options: ED25519KeyPairOptions<"pem", "der">,
|
|
3207
3278
|
): Promise<{
|
|
3208
3279
|
publicKey: string;
|
|
3209
|
-
privateKey:
|
|
3280
|
+
privateKey: NonSharedBuffer;
|
|
3210
3281
|
}>;
|
|
3211
3282
|
function __promisify__(
|
|
3212
3283
|
type: "ed25519",
|
|
3213
3284
|
options: ED25519KeyPairOptions<"der", "pem">,
|
|
3214
3285
|
): Promise<{
|
|
3215
|
-
publicKey:
|
|
3286
|
+
publicKey: NonSharedBuffer;
|
|
3216
3287
|
privateKey: string;
|
|
3217
3288
|
}>;
|
|
3218
3289
|
function __promisify__(
|
|
3219
3290
|
type: "ed25519",
|
|
3220
3291
|
options: ED25519KeyPairOptions<"der", "der">,
|
|
3221
3292
|
): Promise<{
|
|
3222
|
-
publicKey:
|
|
3223
|
-
privateKey:
|
|
3293
|
+
publicKey: NonSharedBuffer;
|
|
3294
|
+
privateKey: NonSharedBuffer;
|
|
3224
3295
|
}>;
|
|
3225
3296
|
function __promisify__(
|
|
3226
3297
|
type: "ed25519",
|
|
@@ -3238,21 +3309,21 @@ declare module "crypto" {
|
|
|
3238
3309
|
options: ED448KeyPairOptions<"pem", "der">,
|
|
3239
3310
|
): Promise<{
|
|
3240
3311
|
publicKey: string;
|
|
3241
|
-
privateKey:
|
|
3312
|
+
privateKey: NonSharedBuffer;
|
|
3242
3313
|
}>;
|
|
3243
3314
|
function __promisify__(
|
|
3244
3315
|
type: "ed448",
|
|
3245
3316
|
options: ED448KeyPairOptions<"der", "pem">,
|
|
3246
3317
|
): Promise<{
|
|
3247
|
-
publicKey:
|
|
3318
|
+
publicKey: NonSharedBuffer;
|
|
3248
3319
|
privateKey: string;
|
|
3249
3320
|
}>;
|
|
3250
3321
|
function __promisify__(
|
|
3251
3322
|
type: "ed448",
|
|
3252
3323
|
options: ED448KeyPairOptions<"der", "der">,
|
|
3253
3324
|
): Promise<{
|
|
3254
|
-
publicKey:
|
|
3255
|
-
privateKey:
|
|
3325
|
+
publicKey: NonSharedBuffer;
|
|
3326
|
+
privateKey: NonSharedBuffer;
|
|
3256
3327
|
}>;
|
|
3257
3328
|
function __promisify__(type: "ed448", options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
3258
3329
|
function __promisify__(
|
|
@@ -3267,21 +3338,21 @@ declare module "crypto" {
|
|
|
3267
3338
|
options: X25519KeyPairOptions<"pem", "der">,
|
|
3268
3339
|
): Promise<{
|
|
3269
3340
|
publicKey: string;
|
|
3270
|
-
privateKey:
|
|
3341
|
+
privateKey: NonSharedBuffer;
|
|
3271
3342
|
}>;
|
|
3272
3343
|
function __promisify__(
|
|
3273
3344
|
type: "x25519",
|
|
3274
3345
|
options: X25519KeyPairOptions<"der", "pem">,
|
|
3275
3346
|
): Promise<{
|
|
3276
|
-
publicKey:
|
|
3347
|
+
publicKey: NonSharedBuffer;
|
|
3277
3348
|
privateKey: string;
|
|
3278
3349
|
}>;
|
|
3279
3350
|
function __promisify__(
|
|
3280
3351
|
type: "x25519",
|
|
3281
3352
|
options: X25519KeyPairOptions<"der", "der">,
|
|
3282
3353
|
): Promise<{
|
|
3283
|
-
publicKey:
|
|
3284
|
-
privateKey:
|
|
3354
|
+
publicKey: NonSharedBuffer;
|
|
3355
|
+
privateKey: NonSharedBuffer;
|
|
3285
3356
|
}>;
|
|
3286
3357
|
function __promisify__(
|
|
3287
3358
|
type: "x25519",
|
|
@@ -3299,21 +3370,21 @@ declare module "crypto" {
|
|
|
3299
3370
|
options: X448KeyPairOptions<"pem", "der">,
|
|
3300
3371
|
): Promise<{
|
|
3301
3372
|
publicKey: string;
|
|
3302
|
-
privateKey:
|
|
3373
|
+
privateKey: NonSharedBuffer;
|
|
3303
3374
|
}>;
|
|
3304
3375
|
function __promisify__(
|
|
3305
3376
|
type: "x448",
|
|
3306
3377
|
options: X448KeyPairOptions<"der", "pem">,
|
|
3307
3378
|
): Promise<{
|
|
3308
|
-
publicKey:
|
|
3379
|
+
publicKey: NonSharedBuffer;
|
|
3309
3380
|
privateKey: string;
|
|
3310
3381
|
}>;
|
|
3311
3382
|
function __promisify__(
|
|
3312
3383
|
type: "x448",
|
|
3313
3384
|
options: X448KeyPairOptions<"der", "der">,
|
|
3314
3385
|
): Promise<{
|
|
3315
|
-
publicKey:
|
|
3316
|
-
privateKey:
|
|
3386
|
+
publicKey: NonSharedBuffer;
|
|
3387
|
+
privateKey: NonSharedBuffer;
|
|
3317
3388
|
}>;
|
|
3318
3389
|
function __promisify__(type: "x448", options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
3319
3390
|
}
|
|
@@ -3333,12 +3404,12 @@ declare module "crypto" {
|
|
|
3333
3404
|
algorithm: string | null | undefined,
|
|
3334
3405
|
data: NodeJS.ArrayBufferView,
|
|
3335
3406
|
key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
|
|
3336
|
-
):
|
|
3407
|
+
): NonSharedBuffer;
|
|
3337
3408
|
function sign(
|
|
3338
3409
|
algorithm: string | null | undefined,
|
|
3339
3410
|
data: NodeJS.ArrayBufferView,
|
|
3340
3411
|
key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
|
|
3341
|
-
callback: (error: Error | null, data:
|
|
3412
|
+
callback: (error: Error | null, data: NonSharedBuffer) => void,
|
|
3342
3413
|
): void;
|
|
3343
3414
|
/**
|
|
3344
3415
|
* Verifies the given signature for `data` using the given key and algorithm. If `algorithm` is `null` or `undefined`, then the algorithm is dependent upon the
|
|
@@ -3374,7 +3445,7 @@ declare module "crypto" {
|
|
|
3374
3445
|
* 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).
|
|
3375
3446
|
* @since v13.9.0, v12.17.0
|
|
3376
3447
|
*/
|
|
3377
|
-
function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }):
|
|
3448
|
+
function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): NonSharedBuffer;
|
|
3378
3449
|
/**
|
|
3379
3450
|
* A utility for creating one-shot hash digests of data. It can be faster than the object-based `crypto.createHash()` when hashing a smaller amount of data
|
|
3380
3451
|
* (<= 5MB) that's readily available. If the data can be big or if it is streamed, it's still recommended to use `crypto.createHash()` instead. The `algorithm`
|
|
@@ -3404,12 +3475,12 @@ declare module "crypto" {
|
|
|
3404
3475
|
* @param [outputEncoding='hex'] [Encoding](https://nodejs.org/docs/latest-v20.x/api/buffer.html#buffers-and-character-encodings) used to encode the returned digest.
|
|
3405
3476
|
*/
|
|
3406
3477
|
function hash(algorithm: string, data: BinaryLike, outputEncoding?: BinaryToTextEncoding): string;
|
|
3407
|
-
function hash(algorithm: string, data: BinaryLike, outputEncoding: "buffer"):
|
|
3478
|
+
function hash(algorithm: string, data: BinaryLike, outputEncoding: "buffer"): NonSharedBuffer;
|
|
3408
3479
|
function hash(
|
|
3409
3480
|
algorithm: string,
|
|
3410
3481
|
data: BinaryLike,
|
|
3411
3482
|
outputEncoding?: BinaryToTextEncoding | "buffer",
|
|
3412
|
-
): string |
|
|
3483
|
+
): string | NonSharedBuffer;
|
|
3413
3484
|
type CipherMode = "cbc" | "ccm" | "cfb" | "ctr" | "ecb" | "gcm" | "ocb" | "ofb" | "stream" | "wrap" | "xts";
|
|
3414
3485
|
interface CipherInfoOptions {
|
|
3415
3486
|
/**
|
|
@@ -3573,23 +3644,23 @@ declare module "crypto" {
|
|
|
3573
3644
|
/**
|
|
3574
3645
|
* @default 'always'
|
|
3575
3646
|
*/
|
|
3576
|
-
subject?: "always" | "default" | "never";
|
|
3647
|
+
subject?: "always" | "default" | "never" | undefined;
|
|
3577
3648
|
/**
|
|
3578
3649
|
* @default true
|
|
3579
3650
|
*/
|
|
3580
|
-
wildcards?: boolean;
|
|
3651
|
+
wildcards?: boolean | undefined;
|
|
3581
3652
|
/**
|
|
3582
3653
|
* @default true
|
|
3583
3654
|
*/
|
|
3584
|
-
partialWildcards?: boolean;
|
|
3655
|
+
partialWildcards?: boolean | undefined;
|
|
3585
3656
|
/**
|
|
3586
3657
|
* @default false
|
|
3587
3658
|
*/
|
|
3588
|
-
multiLabelWildcards?: boolean;
|
|
3659
|
+
multiLabelWildcards?: boolean | undefined;
|
|
3589
3660
|
/**
|
|
3590
3661
|
* @default false
|
|
3591
3662
|
*/
|
|
3592
|
-
singleLabelSubdomains?: boolean;
|
|
3663
|
+
singleLabelSubdomains?: boolean | undefined;
|
|
3593
3664
|
}
|
|
3594
3665
|
/**
|
|
3595
3666
|
* Encapsulates an X509 certificate and provides read-only access to
|
|
@@ -3691,7 +3762,7 @@ declare module "crypto" {
|
|
|
3691
3762
|
* available.
|
|
3692
3763
|
* @since v15.9.0
|
|
3693
3764
|
*/
|
|
3694
|
-
readonly issuerCertificate
|
|
3765
|
+
readonly issuerCertificate: X509Certificate | undefined;
|
|
3695
3766
|
/**
|
|
3696
3767
|
* The public key `KeyObject` for this certificate.
|
|
3697
3768
|
* @since v15.6.0
|
|
@@ -3701,7 +3772,7 @@ declare module "crypto" {
|
|
|
3701
3772
|
* A `Buffer` containing the DER encoding of this certificate.
|
|
3702
3773
|
* @since v15.6.0
|
|
3703
3774
|
*/
|
|
3704
|
-
readonly raw:
|
|
3775
|
+
readonly raw: NonSharedBuffer;
|
|
3705
3776
|
/**
|
|
3706
3777
|
* The serial number of this certificate.
|
|
3707
3778
|
*
|