@emulsify/cli 1.11.3 → 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/index.js +3 -1
- 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 -171
- 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 +137 -32
- 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 +15 -3
- package/dist/node_modules/@types/node/readline.d.ts +66 -17
- 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 +43 -10
- package/dist/node_modules/@types/node/v8.d.ts +7 -6
- package/dist/node_modules/@types/node/vm.d.ts +148 -70
- 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 +969 -1002
- 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,12 +609,7 @@ declare module "crypto" {
|
|
|
608
609
|
* keys.
|
|
609
610
|
* @since v11.6.0
|
|
610
611
|
*/
|
|
611
|
-
asymmetricKeyType?: KeyType
|
|
612
|
-
/**
|
|
613
|
-
* For asymmetric keys, this property represents the size of the embedded key in
|
|
614
|
-
* bytes. This property is `undefined` for symmetric keys.
|
|
615
|
-
*/
|
|
616
|
-
asymmetricKeySize?: number | undefined;
|
|
612
|
+
asymmetricKeyType?: KeyType;
|
|
617
613
|
/**
|
|
618
614
|
* This property exists only on asymmetric keys. Depending on the type of the key,
|
|
619
615
|
* this object contains information about the key. None of the information obtained
|
|
@@ -627,7 +623,7 @@ declare module "crypto" {
|
|
|
627
623
|
* Other key details might be exposed via this API using additional attributes.
|
|
628
624
|
* @since v15.7.0
|
|
629
625
|
*/
|
|
630
|
-
asymmetricKeyDetails?: AsymmetricKeyDetails
|
|
626
|
+
asymmetricKeyDetails?: AsymmetricKeyDetails;
|
|
631
627
|
/**
|
|
632
628
|
* For symmetric keys, the following encoding options can be used:
|
|
633
629
|
*
|
|
@@ -651,8 +647,8 @@ declare module "crypto" {
|
|
|
651
647
|
* PKCS#1 and SEC1 encryption.
|
|
652
648
|
* @since v11.6.0
|
|
653
649
|
*/
|
|
654
|
-
export(options: KeyExportOptions<"pem">): string |
|
|
655
|
-
export(options?: KeyExportOptions<"der">):
|
|
650
|
+
export(options: KeyExportOptions<"pem">): string | NonSharedBuffer;
|
|
651
|
+
export(options?: KeyExportOptions<"der">): NonSharedBuffer;
|
|
656
652
|
export(options?: JwkKeyExportOptions): JsonWebKey;
|
|
657
653
|
/**
|
|
658
654
|
* Returns `true` or `false` depending on whether the keys have exactly the same
|
|
@@ -666,7 +662,7 @@ declare module "crypto" {
|
|
|
666
662
|
* property is `undefined` for asymmetric keys.
|
|
667
663
|
* @since v11.6.0
|
|
668
664
|
*/
|
|
669
|
-
symmetricKeySize?: number
|
|
665
|
+
symmetricKeySize?: number;
|
|
670
666
|
/**
|
|
671
667
|
* Depending on the type of this `KeyObject`, this property is either`'secret'` for secret (symmetric) keys, `'public'` for public (asymmetric) keys
|
|
672
668
|
* or `'private'` for private (asymmetric) keys.
|
|
@@ -674,9 +670,10 @@ declare module "crypto" {
|
|
|
674
670
|
*/
|
|
675
671
|
type: KeyObjectType;
|
|
676
672
|
}
|
|
677
|
-
type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm"
|
|
673
|
+
type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm";
|
|
678
674
|
type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm";
|
|
679
675
|
type CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb";
|
|
676
|
+
type CipherChaCha20Poly1305Types = "chacha20-poly1305";
|
|
680
677
|
type BinaryLike = string | NodeJS.ArrayBufferView;
|
|
681
678
|
type CipherKey = BinaryLike | KeyObject;
|
|
682
679
|
interface CipherCCMOptions extends stream.TransformOptions {
|
|
@@ -688,6 +685,10 @@ declare module "crypto" {
|
|
|
688
685
|
interface CipherOCBOptions extends stream.TransformOptions {
|
|
689
686
|
authTagLength: number;
|
|
690
687
|
}
|
|
688
|
+
interface CipherChaCha20Poly1305Options extends stream.TransformOptions {
|
|
689
|
+
/** @default 16 */
|
|
690
|
+
authTagLength?: number | undefined;
|
|
691
|
+
}
|
|
691
692
|
/**
|
|
692
693
|
* Creates and returns a `Cipher` object that uses the given `algorithm` and `password`.
|
|
693
694
|
*
|
|
@@ -729,6 +730,14 @@ declare module "crypto" {
|
|
|
729
730
|
/** @deprecated since v10.0.0 use `createCipheriv()` */
|
|
730
731
|
function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM;
|
|
731
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()` */
|
|
732
741
|
function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher;
|
|
733
742
|
/**
|
|
734
743
|
* Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
|
|
@@ -778,6 +787,12 @@ declare module "crypto" {
|
|
|
778
787
|
iv: BinaryLike,
|
|
779
788
|
options?: CipherGCMOptions,
|
|
780
789
|
): CipherGCM;
|
|
790
|
+
function createCipheriv(
|
|
791
|
+
algorithm: CipherChaCha20Poly1305Types,
|
|
792
|
+
key: CipherKey,
|
|
793
|
+
iv: BinaryLike,
|
|
794
|
+
options?: CipherChaCha20Poly1305Options,
|
|
795
|
+
): CipherChaCha20Poly1305;
|
|
781
796
|
function createCipheriv(
|
|
782
797
|
algorithm: string,
|
|
783
798
|
key: CipherKey,
|
|
@@ -919,8 +934,8 @@ declare module "crypto" {
|
|
|
919
934
|
* @param inputEncoding The `encoding` of the data.
|
|
920
935
|
* @param outputEncoding The `encoding` of the return value.
|
|
921
936
|
*/
|
|
922
|
-
update(data: BinaryLike):
|
|
923
|
-
update(data: string, inputEncoding: Encoding):
|
|
937
|
+
update(data: BinaryLike): NonSharedBuffer;
|
|
938
|
+
update(data: string, inputEncoding: Encoding): NonSharedBuffer;
|
|
924
939
|
update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
|
|
925
940
|
update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
|
|
926
941
|
/**
|
|
@@ -931,7 +946,7 @@ declare module "crypto" {
|
|
|
931
946
|
* @param outputEncoding The `encoding` of the return value.
|
|
932
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.
|
|
933
948
|
*/
|
|
934
|
-
final():
|
|
949
|
+
final(): NonSharedBuffer;
|
|
935
950
|
final(outputEncoding: BufferEncoding): string;
|
|
936
951
|
/**
|
|
937
952
|
* When using block encryption algorithms, the `Cipher` class will automatically
|
|
@@ -957,7 +972,7 @@ declare module "crypto" {
|
|
|
957
972
|
plaintextLength: number;
|
|
958
973
|
},
|
|
959
974
|
): this;
|
|
960
|
-
getAuthTag():
|
|
975
|
+
getAuthTag(): NonSharedBuffer;
|
|
961
976
|
}
|
|
962
977
|
interface CipherGCM extends Cipher {
|
|
963
978
|
setAAD(
|
|
@@ -966,7 +981,7 @@ declare module "crypto" {
|
|
|
966
981
|
plaintextLength: number;
|
|
967
982
|
},
|
|
968
983
|
): this;
|
|
969
|
-
getAuthTag():
|
|
984
|
+
getAuthTag(): NonSharedBuffer;
|
|
970
985
|
}
|
|
971
986
|
interface CipherOCB extends Cipher {
|
|
972
987
|
setAAD(
|
|
@@ -975,7 +990,16 @@ declare module "crypto" {
|
|
|
975
990
|
plaintextLength: number;
|
|
976
991
|
},
|
|
977
992
|
): this;
|
|
978
|
-
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;
|
|
979
1003
|
}
|
|
980
1004
|
/**
|
|
981
1005
|
* Creates and returns a `Decipher` object that uses the given `algorithm` and `password` (key).
|
|
@@ -1007,6 +1031,14 @@ declare module "crypto" {
|
|
|
1007
1031
|
/** @deprecated since v10.0.0 use `createDecipheriv()` */
|
|
1008
1032
|
function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
|
|
1009
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()` */
|
|
1010
1042
|
function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
|
|
1011
1043
|
/**
|
|
1012
1044
|
* Creates and returns a `Decipher` object that uses the given `algorithm`, `key` and initialization vector (`iv`).
|
|
@@ -1055,6 +1087,12 @@ declare module "crypto" {
|
|
|
1055
1087
|
iv: BinaryLike,
|
|
1056
1088
|
options?: CipherGCMOptions,
|
|
1057
1089
|
): DecipherGCM;
|
|
1090
|
+
function createDecipheriv(
|
|
1091
|
+
algorithm: CipherChaCha20Poly1305Types,
|
|
1092
|
+
key: CipherKey,
|
|
1093
|
+
iv: BinaryLike,
|
|
1094
|
+
options?: CipherChaCha20Poly1305Options,
|
|
1095
|
+
): DecipherChaCha20Poly1305;
|
|
1058
1096
|
function createDecipheriv(
|
|
1059
1097
|
algorithm: string,
|
|
1060
1098
|
key: CipherKey,
|
|
@@ -1185,8 +1223,8 @@ declare module "crypto" {
|
|
|
1185
1223
|
* @param inputEncoding The `encoding` of the `data` string.
|
|
1186
1224
|
* @param outputEncoding The `encoding` of the return value.
|
|
1187
1225
|
*/
|
|
1188
|
-
update(data: NodeJS.ArrayBufferView):
|
|
1189
|
-
update(data: string, inputEncoding: Encoding):
|
|
1226
|
+
update(data: NodeJS.ArrayBufferView): NonSharedBuffer;
|
|
1227
|
+
update(data: string, inputEncoding: Encoding): NonSharedBuffer;
|
|
1190
1228
|
update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
|
|
1191
1229
|
update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
|
|
1192
1230
|
/**
|
|
@@ -1197,7 +1235,7 @@ declare module "crypto" {
|
|
|
1197
1235
|
* @param outputEncoding The `encoding` of the return value.
|
|
1198
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.
|
|
1199
1237
|
*/
|
|
1200
|
-
final():
|
|
1238
|
+
final(): NonSharedBuffer;
|
|
1201
1239
|
final(outputEncoding: BufferEncoding): string;
|
|
1202
1240
|
/**
|
|
1203
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
|
|
@@ -1240,6 +1278,15 @@ declare module "crypto" {
|
|
|
1240
1278
|
},
|
|
1241
1279
|
): this;
|
|
1242
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
|
+
}
|
|
1243
1290
|
interface PrivateKeyInput {
|
|
1244
1291
|
key: string | Buffer;
|
|
1245
1292
|
format?: KeyFormat | undefined;
|
|
@@ -1460,7 +1507,7 @@ declare module "crypto" {
|
|
|
1460
1507
|
* called. Multiple calls to `sign.sign()` will result in an error being thrown.
|
|
1461
1508
|
* @since v0.1.92
|
|
1462
1509
|
*/
|
|
1463
|
-
sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput):
|
|
1510
|
+
sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput): NonSharedBuffer;
|
|
1464
1511
|
sign(
|
|
1465
1512
|
privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
|
|
1466
1513
|
outputFormat: BinaryToTextEncoding,
|
|
@@ -1619,7 +1666,7 @@ declare module "crypto" {
|
|
|
1619
1666
|
* @since v0.5.0
|
|
1620
1667
|
* @param encoding The `encoding` of the return value.
|
|
1621
1668
|
*/
|
|
1622
|
-
generateKeys():
|
|
1669
|
+
generateKeys(): NonSharedBuffer;
|
|
1623
1670
|
generateKeys(encoding: BinaryToTextEncoding): string;
|
|
1624
1671
|
/**
|
|
1625
1672
|
* Computes the shared secret using `otherPublicKey` as the other
|
|
@@ -1634,8 +1681,16 @@ declare module "crypto" {
|
|
|
1634
1681
|
* @param inputEncoding The `encoding` of an `otherPublicKey` string.
|
|
1635
1682
|
* @param outputEncoding The `encoding` of the return value.
|
|
1636
1683
|
*/
|
|
1637
|
-
computeSecret(
|
|
1638
|
-
|
|
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;
|
|
1639
1694
|
computeSecret(
|
|
1640
1695
|
otherPublicKey: NodeJS.ArrayBufferView,
|
|
1641
1696
|
inputEncoding: null,
|
|
@@ -1653,7 +1708,7 @@ declare module "crypto" {
|
|
|
1653
1708
|
* @since v0.5.0
|
|
1654
1709
|
* @param encoding The `encoding` of the return value.
|
|
1655
1710
|
*/
|
|
1656
|
-
getPrime():
|
|
1711
|
+
getPrime(): NonSharedBuffer;
|
|
1657
1712
|
getPrime(encoding: BinaryToTextEncoding): string;
|
|
1658
1713
|
/**
|
|
1659
1714
|
* Returns the Diffie-Hellman generator in the specified `encoding`.
|
|
@@ -1662,7 +1717,7 @@ declare module "crypto" {
|
|
|
1662
1717
|
* @since v0.5.0
|
|
1663
1718
|
* @param encoding The `encoding` of the return value.
|
|
1664
1719
|
*/
|
|
1665
|
-
getGenerator():
|
|
1720
|
+
getGenerator(): NonSharedBuffer;
|
|
1666
1721
|
getGenerator(encoding: BinaryToTextEncoding): string;
|
|
1667
1722
|
/**
|
|
1668
1723
|
* Returns the Diffie-Hellman public key in the specified `encoding`.
|
|
@@ -1671,7 +1726,7 @@ declare module "crypto" {
|
|
|
1671
1726
|
* @since v0.5.0
|
|
1672
1727
|
* @param encoding The `encoding` of the return value.
|
|
1673
1728
|
*/
|
|
1674
|
-
getPublicKey():
|
|
1729
|
+
getPublicKey(): NonSharedBuffer;
|
|
1675
1730
|
getPublicKey(encoding: BinaryToTextEncoding): string;
|
|
1676
1731
|
/**
|
|
1677
1732
|
* Returns the Diffie-Hellman private key in the specified `encoding`.
|
|
@@ -1680,7 +1735,7 @@ declare module "crypto" {
|
|
|
1680
1735
|
* @since v0.5.0
|
|
1681
1736
|
* @param encoding The `encoding` of the return value.
|
|
1682
1737
|
*/
|
|
1683
|
-
getPrivateKey():
|
|
1738
|
+
getPrivateKey(): NonSharedBuffer;
|
|
1684
1739
|
getPrivateKey(encoding: BinaryToTextEncoding): string;
|
|
1685
1740
|
/**
|
|
1686
1741
|
* Sets the Diffie-Hellman public key. If the `encoding` argument is provided, `publicKey` is expected
|
|
@@ -1824,7 +1879,7 @@ declare module "crypto" {
|
|
|
1824
1879
|
iterations: number,
|
|
1825
1880
|
keylen: number,
|
|
1826
1881
|
digest: string,
|
|
1827
|
-
callback: (err: Error | null, derivedKey:
|
|
1882
|
+
callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
|
|
1828
1883
|
): void;
|
|
1829
1884
|
/**
|
|
1830
1885
|
* Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2)
|
|
@@ -1861,7 +1916,7 @@ declare module "crypto" {
|
|
|
1861
1916
|
iterations: number,
|
|
1862
1917
|
keylen: number,
|
|
1863
1918
|
digest: string,
|
|
1864
|
-
):
|
|
1919
|
+
): NonSharedBuffer;
|
|
1865
1920
|
/**
|
|
1866
1921
|
* Generates cryptographically strong pseudorandom data. The `size` argument
|
|
1867
1922
|
* is a number indicating the number of bytes to generate.
|
|
@@ -1914,10 +1969,10 @@ declare module "crypto" {
|
|
|
1914
1969
|
* @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`.
|
|
1915
1970
|
* @return if the `callback` function is not provided.
|
|
1916
1971
|
*/
|
|
1917
|
-
function randomBytes(size: number):
|
|
1918
|
-
function randomBytes(size: number, callback: (err: Error | null, buf:
|
|
1919
|
-
function pseudoRandomBytes(size: number):
|
|
1920
|
-
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;
|
|
1921
1976
|
/**
|
|
1922
1977
|
* Return a random integer `n` such that `min <= n < max`. This
|
|
1923
1978
|
* implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias).
|
|
@@ -2147,14 +2202,14 @@ declare module "crypto" {
|
|
|
2147
2202
|
password: BinaryLike,
|
|
2148
2203
|
salt: BinaryLike,
|
|
2149
2204
|
keylen: number,
|
|
2150
|
-
callback: (err: Error | null, derivedKey:
|
|
2205
|
+
callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
|
|
2151
2206
|
): void;
|
|
2152
2207
|
function scrypt(
|
|
2153
2208
|
password: BinaryLike,
|
|
2154
2209
|
salt: BinaryLike,
|
|
2155
2210
|
keylen: number,
|
|
2156
2211
|
options: ScryptOptions,
|
|
2157
|
-
callback: (err: Error | null, derivedKey:
|
|
2212
|
+
callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
|
|
2158
2213
|
): void;
|
|
2159
2214
|
/**
|
|
2160
2215
|
* Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
|
|
@@ -2186,7 +2241,12 @@ declare module "crypto" {
|
|
|
2186
2241
|
* ```
|
|
2187
2242
|
* @since v10.5.0
|
|
2188
2243
|
*/
|
|
2189
|
-
function scryptSync(
|
|
2244
|
+
function scryptSync(
|
|
2245
|
+
password: BinaryLike,
|
|
2246
|
+
salt: BinaryLike,
|
|
2247
|
+
keylen: number,
|
|
2248
|
+
options?: ScryptOptions,
|
|
2249
|
+
): NonSharedBuffer;
|
|
2190
2250
|
interface RsaPublicKey {
|
|
2191
2251
|
key: KeyLike;
|
|
2192
2252
|
padding?: number | undefined;
|
|
@@ -2212,7 +2272,10 @@ declare module "crypto" {
|
|
|
2212
2272
|
* be passed instead of a public key.
|
|
2213
2273
|
* @since v0.11.14
|
|
2214
2274
|
*/
|
|
2215
|
-
function publicEncrypt(
|
|
2275
|
+
function publicEncrypt(
|
|
2276
|
+
key: RsaPublicKey | RsaPrivateKey | KeyLike,
|
|
2277
|
+
buffer: NodeJS.ArrayBufferView,
|
|
2278
|
+
): NonSharedBuffer;
|
|
2216
2279
|
/**
|
|
2217
2280
|
* Decrypts `buffer` with `key`.`buffer` was previously encrypted using
|
|
2218
2281
|
* the corresponding private key, for example using {@link privateEncrypt}.
|
|
@@ -2224,7 +2287,10 @@ declare module "crypto" {
|
|
|
2224
2287
|
* be passed instead of a public key.
|
|
2225
2288
|
* @since v1.1.0
|
|
2226
2289
|
*/
|
|
2227
|
-
function publicDecrypt(
|
|
2290
|
+
function publicDecrypt(
|
|
2291
|
+
key: RsaPublicKey | RsaPrivateKey | KeyLike,
|
|
2292
|
+
buffer: NodeJS.ArrayBufferView,
|
|
2293
|
+
): NonSharedBuffer;
|
|
2228
2294
|
/**
|
|
2229
2295
|
* Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using
|
|
2230
2296
|
* the corresponding public key, for example using {@link publicEncrypt}.
|
|
@@ -2233,7 +2299,7 @@ declare module "crypto" {
|
|
|
2233
2299
|
* object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`.
|
|
2234
2300
|
* @since v0.11.14
|
|
2235
2301
|
*/
|
|
2236
|
-
function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView):
|
|
2302
|
+
function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): NonSharedBuffer;
|
|
2237
2303
|
/**
|
|
2238
2304
|
* Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
|
|
2239
2305
|
* the corresponding public key, for example using {@link publicDecrypt}.
|
|
@@ -2242,7 +2308,7 @@ declare module "crypto" {
|
|
|
2242
2308
|
* object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`.
|
|
2243
2309
|
* @since v1.1.0
|
|
2244
2310
|
*/
|
|
2245
|
-
function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView):
|
|
2311
|
+
function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView): NonSharedBuffer;
|
|
2246
2312
|
/**
|
|
2247
2313
|
* ```js
|
|
2248
2314
|
* const {
|
|
@@ -2371,7 +2437,7 @@ declare module "crypto" {
|
|
|
2371
2437
|
inputEncoding?: BinaryToTextEncoding,
|
|
2372
2438
|
outputEncoding?: "latin1" | "hex" | "base64" | "base64url",
|
|
2373
2439
|
format?: "uncompressed" | "compressed" | "hybrid",
|
|
2374
|
-
):
|
|
2440
|
+
): NonSharedBuffer | string;
|
|
2375
2441
|
/**
|
|
2376
2442
|
* Generates private and public EC Diffie-Hellman key values, and returns
|
|
2377
2443
|
* the public key in the specified `format` and `encoding`. This key should be
|
|
@@ -2384,7 +2450,7 @@ declare module "crypto" {
|
|
|
2384
2450
|
* @param encoding The `encoding` of the return value.
|
|
2385
2451
|
* @param [format='uncompressed']
|
|
2386
2452
|
*/
|
|
2387
|
-
generateKeys():
|
|
2453
|
+
generateKeys(): NonSharedBuffer;
|
|
2388
2454
|
generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
|
|
2389
2455
|
/**
|
|
2390
2456
|
* Computes the shared secret using `otherPublicKey` as the other
|
|
@@ -2403,8 +2469,8 @@ declare module "crypto" {
|
|
|
2403
2469
|
* @param inputEncoding The `encoding` of the `otherPublicKey` string.
|
|
2404
2470
|
* @param outputEncoding The `encoding` of the return value.
|
|
2405
2471
|
*/
|
|
2406
|
-
computeSecret(otherPublicKey: NodeJS.ArrayBufferView):
|
|
2407
|
-
computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding):
|
|
2472
|
+
computeSecret(otherPublicKey: NodeJS.ArrayBufferView): NonSharedBuffer;
|
|
2473
|
+
computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): NonSharedBuffer;
|
|
2408
2474
|
computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
|
|
2409
2475
|
computeSecret(
|
|
2410
2476
|
otherPublicKey: string,
|
|
@@ -2418,7 +2484,7 @@ declare module "crypto" {
|
|
|
2418
2484
|
* @param encoding The `encoding` of the return value.
|
|
2419
2485
|
* @return The EC Diffie-Hellman in the specified `encoding`.
|
|
2420
2486
|
*/
|
|
2421
|
-
getPrivateKey():
|
|
2487
|
+
getPrivateKey(): NonSharedBuffer;
|
|
2422
2488
|
getPrivateKey(encoding: BinaryToTextEncoding): string;
|
|
2423
2489
|
/**
|
|
2424
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.
|
|
@@ -2430,7 +2496,7 @@ declare module "crypto" {
|
|
|
2430
2496
|
* @param [format='uncompressed']
|
|
2431
2497
|
* @return The EC Diffie-Hellman public key in the specified `encoding` and `format`.
|
|
2432
2498
|
*/
|
|
2433
|
-
getPublicKey(encoding?: null, format?: ECDHKeyFormat):
|
|
2499
|
+
getPublicKey(encoding?: null, format?: ECDHKeyFormat): NonSharedBuffer;
|
|
2434
2500
|
getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
|
|
2435
2501
|
/**
|
|
2436
2502
|
* Sets the EC Diffie-Hellman private key.
|
|
@@ -2529,15 +2595,15 @@ declare module "crypto" {
|
|
|
2529
2595
|
/**
|
|
2530
2596
|
* Name of the message digest
|
|
2531
2597
|
*/
|
|
2532
|
-
hashAlgorithm?: string;
|
|
2598
|
+
hashAlgorithm?: string | undefined;
|
|
2533
2599
|
/**
|
|
2534
2600
|
* Name of the message digest used by MGF1
|
|
2535
2601
|
*/
|
|
2536
|
-
mgf1HashAlgorithm?: string;
|
|
2602
|
+
mgf1HashAlgorithm?: string | undefined;
|
|
2537
2603
|
/**
|
|
2538
2604
|
* Minimal salt length in bytes
|
|
2539
2605
|
*/
|
|
2540
|
-
saltLength?: string;
|
|
2606
|
+
saltLength?: string | undefined;
|
|
2541
2607
|
}
|
|
2542
2608
|
interface DSAKeyPairKeyObjectOptions {
|
|
2543
2609
|
/**
|
|
@@ -2580,15 +2646,15 @@ declare module "crypto" {
|
|
|
2580
2646
|
/**
|
|
2581
2647
|
* Name of the message digest
|
|
2582
2648
|
*/
|
|
2583
|
-
hashAlgorithm?: string;
|
|
2649
|
+
hashAlgorithm?: string | undefined;
|
|
2584
2650
|
/**
|
|
2585
2651
|
* Name of the message digest used by MGF1
|
|
2586
2652
|
*/
|
|
2587
|
-
mgf1HashAlgorithm?: string;
|
|
2653
|
+
mgf1HashAlgorithm?: string | undefined;
|
|
2588
2654
|
/**
|
|
2589
2655
|
* Minimal salt length in bytes
|
|
2590
2656
|
*/
|
|
2591
|
-
saltLength?: string;
|
|
2657
|
+
saltLength?: string | undefined;
|
|
2592
2658
|
publicKeyEncoding: {
|
|
2593
2659
|
type: "spki";
|
|
2594
2660
|
format: PubF;
|
|
@@ -2711,15 +2777,15 @@ declare module "crypto" {
|
|
|
2711
2777
|
function generateKeyPairSync(
|
|
2712
2778
|
type: "rsa",
|
|
2713
2779
|
options: RSAKeyPairOptions<"pem", "der">,
|
|
2714
|
-
): KeyPairSyncResult<string,
|
|
2780
|
+
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2715
2781
|
function generateKeyPairSync(
|
|
2716
2782
|
type: "rsa",
|
|
2717
2783
|
options: RSAKeyPairOptions<"der", "pem">,
|
|
2718
|
-
): KeyPairSyncResult<
|
|
2784
|
+
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2719
2785
|
function generateKeyPairSync(
|
|
2720
2786
|
type: "rsa",
|
|
2721
2787
|
options: RSAKeyPairOptions<"der", "der">,
|
|
2722
|
-
): KeyPairSyncResult<
|
|
2788
|
+
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2723
2789
|
function generateKeyPairSync(type: "rsa", options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2724
2790
|
function generateKeyPairSync(
|
|
2725
2791
|
type: "rsa-pss",
|
|
@@ -2728,15 +2794,15 @@ declare module "crypto" {
|
|
|
2728
2794
|
function generateKeyPairSync(
|
|
2729
2795
|
type: "rsa-pss",
|
|
2730
2796
|
options: RSAPSSKeyPairOptions<"pem", "der">,
|
|
2731
|
-
): KeyPairSyncResult<string,
|
|
2797
|
+
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2732
2798
|
function generateKeyPairSync(
|
|
2733
2799
|
type: "rsa-pss",
|
|
2734
2800
|
options: RSAPSSKeyPairOptions<"der", "pem">,
|
|
2735
|
-
): KeyPairSyncResult<
|
|
2801
|
+
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2736
2802
|
function generateKeyPairSync(
|
|
2737
2803
|
type: "rsa-pss",
|
|
2738
2804
|
options: RSAPSSKeyPairOptions<"der", "der">,
|
|
2739
|
-
): KeyPairSyncResult<
|
|
2805
|
+
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2740
2806
|
function generateKeyPairSync(type: "rsa-pss", options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2741
2807
|
function generateKeyPairSync(
|
|
2742
2808
|
type: "dsa",
|
|
@@ -2745,15 +2811,15 @@ declare module "crypto" {
|
|
|
2745
2811
|
function generateKeyPairSync(
|
|
2746
2812
|
type: "dsa",
|
|
2747
2813
|
options: DSAKeyPairOptions<"pem", "der">,
|
|
2748
|
-
): KeyPairSyncResult<string,
|
|
2814
|
+
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2749
2815
|
function generateKeyPairSync(
|
|
2750
2816
|
type: "dsa",
|
|
2751
2817
|
options: DSAKeyPairOptions<"der", "pem">,
|
|
2752
|
-
): KeyPairSyncResult<
|
|
2818
|
+
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2753
2819
|
function generateKeyPairSync(
|
|
2754
2820
|
type: "dsa",
|
|
2755
2821
|
options: DSAKeyPairOptions<"der", "der">,
|
|
2756
|
-
): KeyPairSyncResult<
|
|
2822
|
+
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2757
2823
|
function generateKeyPairSync(type: "dsa", options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2758
2824
|
function generateKeyPairSync(
|
|
2759
2825
|
type: "ec",
|
|
@@ -2762,15 +2828,15 @@ declare module "crypto" {
|
|
|
2762
2828
|
function generateKeyPairSync(
|
|
2763
2829
|
type: "ec",
|
|
2764
2830
|
options: ECKeyPairOptions<"pem", "der">,
|
|
2765
|
-
): KeyPairSyncResult<string,
|
|
2831
|
+
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2766
2832
|
function generateKeyPairSync(
|
|
2767
2833
|
type: "ec",
|
|
2768
2834
|
options: ECKeyPairOptions<"der", "pem">,
|
|
2769
|
-
): KeyPairSyncResult<
|
|
2835
|
+
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2770
2836
|
function generateKeyPairSync(
|
|
2771
2837
|
type: "ec",
|
|
2772
2838
|
options: ECKeyPairOptions<"der", "der">,
|
|
2773
|
-
): KeyPairSyncResult<
|
|
2839
|
+
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2774
2840
|
function generateKeyPairSync(type: "ec", options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2775
2841
|
function generateKeyPairSync(
|
|
2776
2842
|
type: "ed25519",
|
|
@@ -2779,15 +2845,15 @@ declare module "crypto" {
|
|
|
2779
2845
|
function generateKeyPairSync(
|
|
2780
2846
|
type: "ed25519",
|
|
2781
2847
|
options: ED25519KeyPairOptions<"pem", "der">,
|
|
2782
|
-
): KeyPairSyncResult<string,
|
|
2848
|
+
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2783
2849
|
function generateKeyPairSync(
|
|
2784
2850
|
type: "ed25519",
|
|
2785
2851
|
options: ED25519KeyPairOptions<"der", "pem">,
|
|
2786
|
-
): KeyPairSyncResult<
|
|
2852
|
+
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2787
2853
|
function generateKeyPairSync(
|
|
2788
2854
|
type: "ed25519",
|
|
2789
2855
|
options: ED25519KeyPairOptions<"der", "der">,
|
|
2790
|
-
): KeyPairSyncResult<
|
|
2856
|
+
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2791
2857
|
function generateKeyPairSync(type: "ed25519", options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2792
2858
|
function generateKeyPairSync(
|
|
2793
2859
|
type: "ed448",
|
|
@@ -2796,15 +2862,15 @@ declare module "crypto" {
|
|
|
2796
2862
|
function generateKeyPairSync(
|
|
2797
2863
|
type: "ed448",
|
|
2798
2864
|
options: ED448KeyPairOptions<"pem", "der">,
|
|
2799
|
-
): KeyPairSyncResult<string,
|
|
2865
|
+
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2800
2866
|
function generateKeyPairSync(
|
|
2801
2867
|
type: "ed448",
|
|
2802
2868
|
options: ED448KeyPairOptions<"der", "pem">,
|
|
2803
|
-
): KeyPairSyncResult<
|
|
2869
|
+
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2804
2870
|
function generateKeyPairSync(
|
|
2805
2871
|
type: "ed448",
|
|
2806
2872
|
options: ED448KeyPairOptions<"der", "der">,
|
|
2807
|
-
): KeyPairSyncResult<
|
|
2873
|
+
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2808
2874
|
function generateKeyPairSync(type: "ed448", options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2809
2875
|
function generateKeyPairSync(
|
|
2810
2876
|
type: "x25519",
|
|
@@ -2813,15 +2879,15 @@ declare module "crypto" {
|
|
|
2813
2879
|
function generateKeyPairSync(
|
|
2814
2880
|
type: "x25519",
|
|
2815
2881
|
options: X25519KeyPairOptions<"pem", "der">,
|
|
2816
|
-
): KeyPairSyncResult<string,
|
|
2882
|
+
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2817
2883
|
function generateKeyPairSync(
|
|
2818
2884
|
type: "x25519",
|
|
2819
2885
|
options: X25519KeyPairOptions<"der", "pem">,
|
|
2820
|
-
): KeyPairSyncResult<
|
|
2886
|
+
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2821
2887
|
function generateKeyPairSync(
|
|
2822
2888
|
type: "x25519",
|
|
2823
2889
|
options: X25519KeyPairOptions<"der", "der">,
|
|
2824
|
-
): KeyPairSyncResult<
|
|
2890
|
+
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2825
2891
|
function generateKeyPairSync(type: "x25519", options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2826
2892
|
function generateKeyPairSync(
|
|
2827
2893
|
type: "x448",
|
|
@@ -2830,15 +2896,15 @@ declare module "crypto" {
|
|
|
2830
2896
|
function generateKeyPairSync(
|
|
2831
2897
|
type: "x448",
|
|
2832
2898
|
options: X448KeyPairOptions<"pem", "der">,
|
|
2833
|
-
): KeyPairSyncResult<string,
|
|
2899
|
+
): KeyPairSyncResult<string, NonSharedBuffer>;
|
|
2834
2900
|
function generateKeyPairSync(
|
|
2835
2901
|
type: "x448",
|
|
2836
2902
|
options: X448KeyPairOptions<"der", "pem">,
|
|
2837
|
-
): KeyPairSyncResult<
|
|
2903
|
+
): KeyPairSyncResult<NonSharedBuffer, string>;
|
|
2838
2904
|
function generateKeyPairSync(
|
|
2839
2905
|
type: "x448",
|
|
2840
2906
|
options: X448KeyPairOptions<"der", "der">,
|
|
2841
|
-
): KeyPairSyncResult<
|
|
2907
|
+
): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
|
|
2842
2908
|
function generateKeyPairSync(type: "x448", options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
|
|
2843
2909
|
/**
|
|
2844
2910
|
* Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
|
|
@@ -2887,17 +2953,17 @@ declare module "crypto" {
|
|
|
2887
2953
|
function generateKeyPair(
|
|
2888
2954
|
type: "rsa",
|
|
2889
2955
|
options: RSAKeyPairOptions<"pem", "der">,
|
|
2890
|
-
callback: (err: Error | null, publicKey: string, privateKey:
|
|
2956
|
+
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
2891
2957
|
): void;
|
|
2892
2958
|
function generateKeyPair(
|
|
2893
2959
|
type: "rsa",
|
|
2894
2960
|
options: RSAKeyPairOptions<"der", "pem">,
|
|
2895
|
-
callback: (err: Error | null, publicKey:
|
|
2961
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
2896
2962
|
): void;
|
|
2897
2963
|
function generateKeyPair(
|
|
2898
2964
|
type: "rsa",
|
|
2899
2965
|
options: RSAKeyPairOptions<"der", "der">,
|
|
2900
|
-
callback: (err: Error | null, publicKey:
|
|
2966
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
2901
2967
|
): void;
|
|
2902
2968
|
function generateKeyPair(
|
|
2903
2969
|
type: "rsa",
|
|
@@ -2912,17 +2978,17 @@ declare module "crypto" {
|
|
|
2912
2978
|
function generateKeyPair(
|
|
2913
2979
|
type: "rsa-pss",
|
|
2914
2980
|
options: RSAPSSKeyPairOptions<"pem", "der">,
|
|
2915
|
-
callback: (err: Error | null, publicKey: string, privateKey:
|
|
2981
|
+
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
2916
2982
|
): void;
|
|
2917
2983
|
function generateKeyPair(
|
|
2918
2984
|
type: "rsa-pss",
|
|
2919
2985
|
options: RSAPSSKeyPairOptions<"der", "pem">,
|
|
2920
|
-
callback: (err: Error | null, publicKey:
|
|
2986
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
2921
2987
|
): void;
|
|
2922
2988
|
function generateKeyPair(
|
|
2923
2989
|
type: "rsa-pss",
|
|
2924
2990
|
options: RSAPSSKeyPairOptions<"der", "der">,
|
|
2925
|
-
callback: (err: Error | null, publicKey:
|
|
2991
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
2926
2992
|
): void;
|
|
2927
2993
|
function generateKeyPair(
|
|
2928
2994
|
type: "rsa-pss",
|
|
@@ -2937,17 +3003,17 @@ declare module "crypto" {
|
|
|
2937
3003
|
function generateKeyPair(
|
|
2938
3004
|
type: "dsa",
|
|
2939
3005
|
options: DSAKeyPairOptions<"pem", "der">,
|
|
2940
|
-
callback: (err: Error | null, publicKey: string, privateKey:
|
|
3006
|
+
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
2941
3007
|
): void;
|
|
2942
3008
|
function generateKeyPair(
|
|
2943
3009
|
type: "dsa",
|
|
2944
3010
|
options: DSAKeyPairOptions<"der", "pem">,
|
|
2945
|
-
callback: (err: Error | null, publicKey:
|
|
3011
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
2946
3012
|
): void;
|
|
2947
3013
|
function generateKeyPair(
|
|
2948
3014
|
type: "dsa",
|
|
2949
3015
|
options: DSAKeyPairOptions<"der", "der">,
|
|
2950
|
-
callback: (err: Error | null, publicKey:
|
|
3016
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
2951
3017
|
): void;
|
|
2952
3018
|
function generateKeyPair(
|
|
2953
3019
|
type: "dsa",
|
|
@@ -2962,17 +3028,17 @@ declare module "crypto" {
|
|
|
2962
3028
|
function generateKeyPair(
|
|
2963
3029
|
type: "ec",
|
|
2964
3030
|
options: ECKeyPairOptions<"pem", "der">,
|
|
2965
|
-
callback: (err: Error | null, publicKey: string, privateKey:
|
|
3031
|
+
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
2966
3032
|
): void;
|
|
2967
3033
|
function generateKeyPair(
|
|
2968
3034
|
type: "ec",
|
|
2969
3035
|
options: ECKeyPairOptions<"der", "pem">,
|
|
2970
|
-
callback: (err: Error | null, publicKey:
|
|
3036
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
2971
3037
|
): void;
|
|
2972
3038
|
function generateKeyPair(
|
|
2973
3039
|
type: "ec",
|
|
2974
3040
|
options: ECKeyPairOptions<"der", "der">,
|
|
2975
|
-
callback: (err: Error | null, publicKey:
|
|
3041
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
2976
3042
|
): void;
|
|
2977
3043
|
function generateKeyPair(
|
|
2978
3044
|
type: "ec",
|
|
@@ -2987,17 +3053,17 @@ declare module "crypto" {
|
|
|
2987
3053
|
function generateKeyPair(
|
|
2988
3054
|
type: "ed25519",
|
|
2989
3055
|
options: ED25519KeyPairOptions<"pem", "der">,
|
|
2990
|
-
callback: (err: Error | null, publicKey: string, privateKey:
|
|
3056
|
+
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
2991
3057
|
): void;
|
|
2992
3058
|
function generateKeyPair(
|
|
2993
3059
|
type: "ed25519",
|
|
2994
3060
|
options: ED25519KeyPairOptions<"der", "pem">,
|
|
2995
|
-
callback: (err: Error | null, publicKey:
|
|
3061
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
2996
3062
|
): void;
|
|
2997
3063
|
function generateKeyPair(
|
|
2998
3064
|
type: "ed25519",
|
|
2999
3065
|
options: ED25519KeyPairOptions<"der", "der">,
|
|
3000
|
-
callback: (err: Error | null, publicKey:
|
|
3066
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
3001
3067
|
): void;
|
|
3002
3068
|
function generateKeyPair(
|
|
3003
3069
|
type: "ed25519",
|
|
@@ -3012,17 +3078,17 @@ declare module "crypto" {
|
|
|
3012
3078
|
function generateKeyPair(
|
|
3013
3079
|
type: "ed448",
|
|
3014
3080
|
options: ED448KeyPairOptions<"pem", "der">,
|
|
3015
|
-
callback: (err: Error | null, publicKey: string, privateKey:
|
|
3081
|
+
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
3016
3082
|
): void;
|
|
3017
3083
|
function generateKeyPair(
|
|
3018
3084
|
type: "ed448",
|
|
3019
3085
|
options: ED448KeyPairOptions<"der", "pem">,
|
|
3020
|
-
callback: (err: Error | null, publicKey:
|
|
3086
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
3021
3087
|
): void;
|
|
3022
3088
|
function generateKeyPair(
|
|
3023
3089
|
type: "ed448",
|
|
3024
3090
|
options: ED448KeyPairOptions<"der", "der">,
|
|
3025
|
-
callback: (err: Error | null, publicKey:
|
|
3091
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
3026
3092
|
): void;
|
|
3027
3093
|
function generateKeyPair(
|
|
3028
3094
|
type: "ed448",
|
|
@@ -3037,17 +3103,17 @@ declare module "crypto" {
|
|
|
3037
3103
|
function generateKeyPair(
|
|
3038
3104
|
type: "x25519",
|
|
3039
3105
|
options: X25519KeyPairOptions<"pem", "der">,
|
|
3040
|
-
callback: (err: Error | null, publicKey: string, privateKey:
|
|
3106
|
+
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
3041
3107
|
): void;
|
|
3042
3108
|
function generateKeyPair(
|
|
3043
3109
|
type: "x25519",
|
|
3044
3110
|
options: X25519KeyPairOptions<"der", "pem">,
|
|
3045
|
-
callback: (err: Error | null, publicKey:
|
|
3111
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
3046
3112
|
): void;
|
|
3047
3113
|
function generateKeyPair(
|
|
3048
3114
|
type: "x25519",
|
|
3049
3115
|
options: X25519KeyPairOptions<"der", "der">,
|
|
3050
|
-
callback: (err: Error | null, publicKey:
|
|
3116
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
3051
3117
|
): void;
|
|
3052
3118
|
function generateKeyPair(
|
|
3053
3119
|
type: "x25519",
|
|
@@ -3062,17 +3128,17 @@ declare module "crypto" {
|
|
|
3062
3128
|
function generateKeyPair(
|
|
3063
3129
|
type: "x448",
|
|
3064
3130
|
options: X448KeyPairOptions<"pem", "der">,
|
|
3065
|
-
callback: (err: Error | null, publicKey: string, privateKey:
|
|
3131
|
+
callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
|
|
3066
3132
|
): void;
|
|
3067
3133
|
function generateKeyPair(
|
|
3068
3134
|
type: "x448",
|
|
3069
3135
|
options: X448KeyPairOptions<"der", "pem">,
|
|
3070
|
-
callback: (err: Error | null, publicKey:
|
|
3136
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
|
|
3071
3137
|
): void;
|
|
3072
3138
|
function generateKeyPair(
|
|
3073
3139
|
type: "x448",
|
|
3074
3140
|
options: X448KeyPairOptions<"der", "der">,
|
|
3075
|
-
callback: (err: Error | null, publicKey:
|
|
3141
|
+
callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
|
|
3076
3142
|
): void;
|
|
3077
3143
|
function generateKeyPair(
|
|
3078
3144
|
type: "x448",
|
|
@@ -3092,21 +3158,21 @@ declare module "crypto" {
|
|
|
3092
3158
|
options: RSAKeyPairOptions<"pem", "der">,
|
|
3093
3159
|
): Promise<{
|
|
3094
3160
|
publicKey: string;
|
|
3095
|
-
privateKey:
|
|
3161
|
+
privateKey: NonSharedBuffer;
|
|
3096
3162
|
}>;
|
|
3097
3163
|
function __promisify__(
|
|
3098
3164
|
type: "rsa",
|
|
3099
3165
|
options: RSAKeyPairOptions<"der", "pem">,
|
|
3100
3166
|
): Promise<{
|
|
3101
|
-
publicKey:
|
|
3167
|
+
publicKey: NonSharedBuffer;
|
|
3102
3168
|
privateKey: string;
|
|
3103
3169
|
}>;
|
|
3104
3170
|
function __promisify__(
|
|
3105
3171
|
type: "rsa",
|
|
3106
3172
|
options: RSAKeyPairOptions<"der", "der">,
|
|
3107
3173
|
): Promise<{
|
|
3108
|
-
publicKey:
|
|
3109
|
-
privateKey:
|
|
3174
|
+
publicKey: NonSharedBuffer;
|
|
3175
|
+
privateKey: NonSharedBuffer;
|
|
3110
3176
|
}>;
|
|
3111
3177
|
function __promisify__(type: "rsa", options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
3112
3178
|
function __promisify__(
|
|
@@ -3121,21 +3187,21 @@ declare module "crypto" {
|
|
|
3121
3187
|
options: RSAPSSKeyPairOptions<"pem", "der">,
|
|
3122
3188
|
): Promise<{
|
|
3123
3189
|
publicKey: string;
|
|
3124
|
-
privateKey:
|
|
3190
|
+
privateKey: NonSharedBuffer;
|
|
3125
3191
|
}>;
|
|
3126
3192
|
function __promisify__(
|
|
3127
3193
|
type: "rsa-pss",
|
|
3128
3194
|
options: RSAPSSKeyPairOptions<"der", "pem">,
|
|
3129
3195
|
): Promise<{
|
|
3130
|
-
publicKey:
|
|
3196
|
+
publicKey: NonSharedBuffer;
|
|
3131
3197
|
privateKey: string;
|
|
3132
3198
|
}>;
|
|
3133
3199
|
function __promisify__(
|
|
3134
3200
|
type: "rsa-pss",
|
|
3135
3201
|
options: RSAPSSKeyPairOptions<"der", "der">,
|
|
3136
3202
|
): Promise<{
|
|
3137
|
-
publicKey:
|
|
3138
|
-
privateKey:
|
|
3203
|
+
publicKey: NonSharedBuffer;
|
|
3204
|
+
privateKey: NonSharedBuffer;
|
|
3139
3205
|
}>;
|
|
3140
3206
|
function __promisify__(
|
|
3141
3207
|
type: "rsa-pss",
|
|
@@ -3153,21 +3219,21 @@ declare module "crypto" {
|
|
|
3153
3219
|
options: DSAKeyPairOptions<"pem", "der">,
|
|
3154
3220
|
): Promise<{
|
|
3155
3221
|
publicKey: string;
|
|
3156
|
-
privateKey:
|
|
3222
|
+
privateKey: NonSharedBuffer;
|
|
3157
3223
|
}>;
|
|
3158
3224
|
function __promisify__(
|
|
3159
3225
|
type: "dsa",
|
|
3160
3226
|
options: DSAKeyPairOptions<"der", "pem">,
|
|
3161
3227
|
): Promise<{
|
|
3162
|
-
publicKey:
|
|
3228
|
+
publicKey: NonSharedBuffer;
|
|
3163
3229
|
privateKey: string;
|
|
3164
3230
|
}>;
|
|
3165
3231
|
function __promisify__(
|
|
3166
3232
|
type: "dsa",
|
|
3167
3233
|
options: DSAKeyPairOptions<"der", "der">,
|
|
3168
3234
|
): Promise<{
|
|
3169
|
-
publicKey:
|
|
3170
|
-
privateKey:
|
|
3235
|
+
publicKey: NonSharedBuffer;
|
|
3236
|
+
privateKey: NonSharedBuffer;
|
|
3171
3237
|
}>;
|
|
3172
3238
|
function __promisify__(type: "dsa", options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
3173
3239
|
function __promisify__(
|
|
@@ -3182,21 +3248,21 @@ declare module "crypto" {
|
|
|
3182
3248
|
options: ECKeyPairOptions<"pem", "der">,
|
|
3183
3249
|
): Promise<{
|
|
3184
3250
|
publicKey: string;
|
|
3185
|
-
privateKey:
|
|
3251
|
+
privateKey: NonSharedBuffer;
|
|
3186
3252
|
}>;
|
|
3187
3253
|
function __promisify__(
|
|
3188
3254
|
type: "ec",
|
|
3189
3255
|
options: ECKeyPairOptions<"der", "pem">,
|
|
3190
3256
|
): Promise<{
|
|
3191
|
-
publicKey:
|
|
3257
|
+
publicKey: NonSharedBuffer;
|
|
3192
3258
|
privateKey: string;
|
|
3193
3259
|
}>;
|
|
3194
3260
|
function __promisify__(
|
|
3195
3261
|
type: "ec",
|
|
3196
3262
|
options: ECKeyPairOptions<"der", "der">,
|
|
3197
3263
|
): Promise<{
|
|
3198
|
-
publicKey:
|
|
3199
|
-
privateKey:
|
|
3264
|
+
publicKey: NonSharedBuffer;
|
|
3265
|
+
privateKey: NonSharedBuffer;
|
|
3200
3266
|
}>;
|
|
3201
3267
|
function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
3202
3268
|
function __promisify__(
|
|
@@ -3211,21 +3277,21 @@ declare module "crypto" {
|
|
|
3211
3277
|
options: ED25519KeyPairOptions<"pem", "der">,
|
|
3212
3278
|
): Promise<{
|
|
3213
3279
|
publicKey: string;
|
|
3214
|
-
privateKey:
|
|
3280
|
+
privateKey: NonSharedBuffer;
|
|
3215
3281
|
}>;
|
|
3216
3282
|
function __promisify__(
|
|
3217
3283
|
type: "ed25519",
|
|
3218
3284
|
options: ED25519KeyPairOptions<"der", "pem">,
|
|
3219
3285
|
): Promise<{
|
|
3220
|
-
publicKey:
|
|
3286
|
+
publicKey: NonSharedBuffer;
|
|
3221
3287
|
privateKey: string;
|
|
3222
3288
|
}>;
|
|
3223
3289
|
function __promisify__(
|
|
3224
3290
|
type: "ed25519",
|
|
3225
3291
|
options: ED25519KeyPairOptions<"der", "der">,
|
|
3226
3292
|
): Promise<{
|
|
3227
|
-
publicKey:
|
|
3228
|
-
privateKey:
|
|
3293
|
+
publicKey: NonSharedBuffer;
|
|
3294
|
+
privateKey: NonSharedBuffer;
|
|
3229
3295
|
}>;
|
|
3230
3296
|
function __promisify__(
|
|
3231
3297
|
type: "ed25519",
|
|
@@ -3243,21 +3309,21 @@ declare module "crypto" {
|
|
|
3243
3309
|
options: ED448KeyPairOptions<"pem", "der">,
|
|
3244
3310
|
): Promise<{
|
|
3245
3311
|
publicKey: string;
|
|
3246
|
-
privateKey:
|
|
3312
|
+
privateKey: NonSharedBuffer;
|
|
3247
3313
|
}>;
|
|
3248
3314
|
function __promisify__(
|
|
3249
3315
|
type: "ed448",
|
|
3250
3316
|
options: ED448KeyPairOptions<"der", "pem">,
|
|
3251
3317
|
): Promise<{
|
|
3252
|
-
publicKey:
|
|
3318
|
+
publicKey: NonSharedBuffer;
|
|
3253
3319
|
privateKey: string;
|
|
3254
3320
|
}>;
|
|
3255
3321
|
function __promisify__(
|
|
3256
3322
|
type: "ed448",
|
|
3257
3323
|
options: ED448KeyPairOptions<"der", "der">,
|
|
3258
3324
|
): Promise<{
|
|
3259
|
-
publicKey:
|
|
3260
|
-
privateKey:
|
|
3325
|
+
publicKey: NonSharedBuffer;
|
|
3326
|
+
privateKey: NonSharedBuffer;
|
|
3261
3327
|
}>;
|
|
3262
3328
|
function __promisify__(type: "ed448", options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
3263
3329
|
function __promisify__(
|
|
@@ -3272,21 +3338,21 @@ declare module "crypto" {
|
|
|
3272
3338
|
options: X25519KeyPairOptions<"pem", "der">,
|
|
3273
3339
|
): Promise<{
|
|
3274
3340
|
publicKey: string;
|
|
3275
|
-
privateKey:
|
|
3341
|
+
privateKey: NonSharedBuffer;
|
|
3276
3342
|
}>;
|
|
3277
3343
|
function __promisify__(
|
|
3278
3344
|
type: "x25519",
|
|
3279
3345
|
options: X25519KeyPairOptions<"der", "pem">,
|
|
3280
3346
|
): Promise<{
|
|
3281
|
-
publicKey:
|
|
3347
|
+
publicKey: NonSharedBuffer;
|
|
3282
3348
|
privateKey: string;
|
|
3283
3349
|
}>;
|
|
3284
3350
|
function __promisify__(
|
|
3285
3351
|
type: "x25519",
|
|
3286
3352
|
options: X25519KeyPairOptions<"der", "der">,
|
|
3287
3353
|
): Promise<{
|
|
3288
|
-
publicKey:
|
|
3289
|
-
privateKey:
|
|
3354
|
+
publicKey: NonSharedBuffer;
|
|
3355
|
+
privateKey: NonSharedBuffer;
|
|
3290
3356
|
}>;
|
|
3291
3357
|
function __promisify__(
|
|
3292
3358
|
type: "x25519",
|
|
@@ -3304,21 +3370,21 @@ declare module "crypto" {
|
|
|
3304
3370
|
options: X448KeyPairOptions<"pem", "der">,
|
|
3305
3371
|
): Promise<{
|
|
3306
3372
|
publicKey: string;
|
|
3307
|
-
privateKey:
|
|
3373
|
+
privateKey: NonSharedBuffer;
|
|
3308
3374
|
}>;
|
|
3309
3375
|
function __promisify__(
|
|
3310
3376
|
type: "x448",
|
|
3311
3377
|
options: X448KeyPairOptions<"der", "pem">,
|
|
3312
3378
|
): Promise<{
|
|
3313
|
-
publicKey:
|
|
3379
|
+
publicKey: NonSharedBuffer;
|
|
3314
3380
|
privateKey: string;
|
|
3315
3381
|
}>;
|
|
3316
3382
|
function __promisify__(
|
|
3317
3383
|
type: "x448",
|
|
3318
3384
|
options: X448KeyPairOptions<"der", "der">,
|
|
3319
3385
|
): Promise<{
|
|
3320
|
-
publicKey:
|
|
3321
|
-
privateKey:
|
|
3386
|
+
publicKey: NonSharedBuffer;
|
|
3387
|
+
privateKey: NonSharedBuffer;
|
|
3322
3388
|
}>;
|
|
3323
3389
|
function __promisify__(type: "x448", options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
|
|
3324
3390
|
}
|
|
@@ -3338,12 +3404,12 @@ declare module "crypto" {
|
|
|
3338
3404
|
algorithm: string | null | undefined,
|
|
3339
3405
|
data: NodeJS.ArrayBufferView,
|
|
3340
3406
|
key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
|
|
3341
|
-
):
|
|
3407
|
+
): NonSharedBuffer;
|
|
3342
3408
|
function sign(
|
|
3343
3409
|
algorithm: string | null | undefined,
|
|
3344
3410
|
data: NodeJS.ArrayBufferView,
|
|
3345
3411
|
key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
|
|
3346
|
-
callback: (error: Error | null, data:
|
|
3412
|
+
callback: (error: Error | null, data: NonSharedBuffer) => void,
|
|
3347
3413
|
): void;
|
|
3348
3414
|
/**
|
|
3349
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
|
|
@@ -3379,7 +3445,7 @@ declare module "crypto" {
|
|
|
3379
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).
|
|
3380
3446
|
* @since v13.9.0, v12.17.0
|
|
3381
3447
|
*/
|
|
3382
|
-
function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }):
|
|
3448
|
+
function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): NonSharedBuffer;
|
|
3383
3449
|
/**
|
|
3384
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
|
|
3385
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`
|
|
@@ -3409,12 +3475,12 @@ declare module "crypto" {
|
|
|
3409
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.
|
|
3410
3476
|
*/
|
|
3411
3477
|
function hash(algorithm: string, data: BinaryLike, outputEncoding?: BinaryToTextEncoding): string;
|
|
3412
|
-
function hash(algorithm: string, data: BinaryLike, outputEncoding: "buffer"):
|
|
3478
|
+
function hash(algorithm: string, data: BinaryLike, outputEncoding: "buffer"): NonSharedBuffer;
|
|
3413
3479
|
function hash(
|
|
3414
3480
|
algorithm: string,
|
|
3415
3481
|
data: BinaryLike,
|
|
3416
3482
|
outputEncoding?: BinaryToTextEncoding | "buffer",
|
|
3417
|
-
): string |
|
|
3483
|
+
): string | NonSharedBuffer;
|
|
3418
3484
|
type CipherMode = "cbc" | "ccm" | "cfb" | "ctr" | "ecb" | "gcm" | "ocb" | "ofb" | "stream" | "wrap" | "xts";
|
|
3419
3485
|
interface CipherInfoOptions {
|
|
3420
3486
|
/**
|
|
@@ -3578,23 +3644,23 @@ declare module "crypto" {
|
|
|
3578
3644
|
/**
|
|
3579
3645
|
* @default 'always'
|
|
3580
3646
|
*/
|
|
3581
|
-
subject?: "always" | "default" | "never";
|
|
3647
|
+
subject?: "always" | "default" | "never" | undefined;
|
|
3582
3648
|
/**
|
|
3583
3649
|
* @default true
|
|
3584
3650
|
*/
|
|
3585
|
-
wildcards?: boolean;
|
|
3651
|
+
wildcards?: boolean | undefined;
|
|
3586
3652
|
/**
|
|
3587
3653
|
* @default true
|
|
3588
3654
|
*/
|
|
3589
|
-
partialWildcards?: boolean;
|
|
3655
|
+
partialWildcards?: boolean | undefined;
|
|
3590
3656
|
/**
|
|
3591
3657
|
* @default false
|
|
3592
3658
|
*/
|
|
3593
|
-
multiLabelWildcards?: boolean;
|
|
3659
|
+
multiLabelWildcards?: boolean | undefined;
|
|
3594
3660
|
/**
|
|
3595
3661
|
* @default false
|
|
3596
3662
|
*/
|
|
3597
|
-
singleLabelSubdomains?: boolean;
|
|
3663
|
+
singleLabelSubdomains?: boolean | undefined;
|
|
3598
3664
|
}
|
|
3599
3665
|
/**
|
|
3600
3666
|
* Encapsulates an X509 certificate and provides read-only access to
|
|
@@ -3696,7 +3762,7 @@ declare module "crypto" {
|
|
|
3696
3762
|
* available.
|
|
3697
3763
|
* @since v15.9.0
|
|
3698
3764
|
*/
|
|
3699
|
-
readonly issuerCertificate
|
|
3765
|
+
readonly issuerCertificate: X509Certificate | undefined;
|
|
3700
3766
|
/**
|
|
3701
3767
|
* The public key `KeyObject` for this certificate.
|
|
3702
3768
|
* @since v15.6.0
|
|
@@ -3706,7 +3772,7 @@ declare module "crypto" {
|
|
|
3706
3772
|
* A `Buffer` containing the DER encoding of this certificate.
|
|
3707
3773
|
* @since v15.6.0
|
|
3708
3774
|
*/
|
|
3709
|
-
readonly raw:
|
|
3775
|
+
readonly raw: NonSharedBuffer;
|
|
3710
3776
|
/**
|
|
3711
3777
|
* The serial number of this certificate.
|
|
3712
3778
|
*
|