cdk-common 2.0.1306 → 2.0.1308

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.
Files changed (88) hide show
  1. package/.jsii +14 -2
  2. package/API.md +12 -0
  3. package/lib/main.js +1 -1
  4. package/lib/managed-policies.d.ts +3 -1
  5. package/lib/managed-policies.js +3 -1
  6. package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
  7. package/node_modules/@types/concat-stream/node_modules/@types/node/assert.d.ts +36 -1
  8. package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.buffer.d.ts +9 -0
  9. package/node_modules/@types/concat-stream/node_modules/@types/node/buffer.d.ts +8 -4
  10. package/node_modules/@types/concat-stream/node_modules/@types/node/child_process.d.ts +50 -33
  11. package/node_modules/@types/concat-stream/node_modules/@types/node/cluster.d.ts +1 -1
  12. package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +554 -189
  13. package/node_modules/@types/concat-stream/node_modules/@types/node/dgram.d.ts +9 -8
  14. package/node_modules/@types/concat-stream/node_modules/@types/node/diagnostics_channel.d.ts +0 -2
  15. package/node_modules/@types/concat-stream/node_modules/@types/node/fs/promises.d.ts +39 -21
  16. package/node_modules/@types/concat-stream/node_modules/@types/node/fs.d.ts +89 -76
  17. package/node_modules/@types/concat-stream/node_modules/@types/node/globals.typedarray.d.ts +19 -0
  18. package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +52 -22
  19. package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +173 -48
  20. package/node_modules/@types/concat-stream/node_modules/@types/node/https.d.ts +82 -50
  21. package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +7 -6
  22. package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +3 -2
  23. package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +3 -3
  24. package/node_modules/@types/concat-stream/node_modules/@types/node/process.d.ts +2 -1
  25. package/node_modules/@types/concat-stream/node_modules/@types/node/sea.d.ts +9 -0
  26. package/node_modules/@types/concat-stream/node_modules/@types/node/sqlite.d.ts +114 -7
  27. package/node_modules/@types/concat-stream/node_modules/@types/node/stream/consumers.d.ts +2 -2
  28. package/node_modules/@types/concat-stream/node_modules/@types/node/stream.d.ts +9 -1
  29. package/node_modules/@types/concat-stream/node_modules/@types/node/string_decoder.d.ts +2 -2
  30. package/node_modules/@types/concat-stream/node_modules/@types/node/tls.d.ts +88 -64
  31. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
  32. package/node_modules/@types/concat-stream/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +16 -0
  33. package/node_modules/@types/concat-stream/node_modules/@types/node/url.d.ts +2 -2
  34. package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +12 -3
  35. package/node_modules/@types/concat-stream/node_modules/@types/node/v8.d.ts +36 -3
  36. package/node_modules/@types/concat-stream/node_modules/@types/node/vm.d.ts +152 -41
  37. package/node_modules/@types/concat-stream/node_modules/@types/node/wasi.d.ts +1 -1
  38. package/node_modules/@types/concat-stream/node_modules/@types/node/worker_threads.d.ts +76 -1
  39. package/node_modules/@types/concat-stream/node_modules/@types/node/zlib.d.ts +25 -24
  40. package/node_modules/@types/concat-stream/node_modules/undici-types/agent.d.ts +1 -0
  41. package/node_modules/@types/concat-stream/node_modules/undici-types/diagnostics-channel.d.ts +0 -1
  42. package/node_modules/@types/concat-stream/node_modules/undici-types/errors.d.ts +5 -15
  43. package/node_modules/@types/concat-stream/node_modules/undici-types/interceptors.d.ts +5 -0
  44. package/node_modules/@types/concat-stream/node_modules/undici-types/package.json +1 -1
  45. package/node_modules/@types/concat-stream/node_modules/undici-types/snapshot-agent.d.ts +5 -3
  46. package/node_modules/@types/concat-stream/node_modules/undici-types/webidl.d.ts +82 -21
  47. package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
  48. package/node_modules/@types/form-data/node_modules/@types/node/assert.d.ts +36 -1
  49. package/node_modules/@types/form-data/node_modules/@types/node/buffer.buffer.d.ts +9 -0
  50. package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +8 -4
  51. package/node_modules/@types/form-data/node_modules/@types/node/child_process.d.ts +50 -33
  52. package/node_modules/@types/form-data/node_modules/@types/node/cluster.d.ts +1 -1
  53. package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +554 -189
  54. package/node_modules/@types/form-data/node_modules/@types/node/dgram.d.ts +9 -8
  55. package/node_modules/@types/form-data/node_modules/@types/node/diagnostics_channel.d.ts +0 -2
  56. package/node_modules/@types/form-data/node_modules/@types/node/fs/promises.d.ts +39 -21
  57. package/node_modules/@types/form-data/node_modules/@types/node/fs.d.ts +89 -76
  58. package/node_modules/@types/form-data/node_modules/@types/node/globals.typedarray.d.ts +19 -0
  59. package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +52 -22
  60. package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +173 -48
  61. package/node_modules/@types/form-data/node_modules/@types/node/https.d.ts +82 -50
  62. package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +7 -6
  63. package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +3 -2
  64. package/node_modules/@types/form-data/node_modules/@types/node/package.json +3 -3
  65. package/node_modules/@types/form-data/node_modules/@types/node/process.d.ts +2 -1
  66. package/node_modules/@types/form-data/node_modules/@types/node/sea.d.ts +9 -0
  67. package/node_modules/@types/form-data/node_modules/@types/node/sqlite.d.ts +114 -7
  68. package/node_modules/@types/form-data/node_modules/@types/node/stream/consumers.d.ts +2 -2
  69. package/node_modules/@types/form-data/node_modules/@types/node/stream.d.ts +9 -1
  70. package/node_modules/@types/form-data/node_modules/@types/node/string_decoder.d.ts +2 -2
  71. package/node_modules/@types/form-data/node_modules/@types/node/tls.d.ts +88 -64
  72. package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +10 -2
  73. package/node_modules/@types/form-data/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +16 -0
  74. package/node_modules/@types/form-data/node_modules/@types/node/url.d.ts +2 -2
  75. package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +12 -3
  76. package/node_modules/@types/form-data/node_modules/@types/node/v8.d.ts +36 -3
  77. package/node_modules/@types/form-data/node_modules/@types/node/vm.d.ts +152 -41
  78. package/node_modules/@types/form-data/node_modules/@types/node/wasi.d.ts +1 -1
  79. package/node_modules/@types/form-data/node_modules/@types/node/worker_threads.d.ts +76 -1
  80. package/node_modules/@types/form-data/node_modules/@types/node/zlib.d.ts +25 -24
  81. package/node_modules/@types/form-data/node_modules/undici-types/agent.d.ts +1 -0
  82. package/node_modules/@types/form-data/node_modules/undici-types/diagnostics-channel.d.ts +0 -1
  83. package/node_modules/@types/form-data/node_modules/undici-types/errors.d.ts +5 -15
  84. package/node_modules/@types/form-data/node_modules/undici-types/interceptors.d.ts +5 -0
  85. package/node_modules/@types/form-data/node_modules/undici-types/package.json +1 -1
  86. package/node_modules/@types/form-data/node_modules/undici-types/snapshot-agent.d.ts +5 -3
  87. package/node_modules/@types/form-data/node_modules/undici-types/webidl.d.ts +82 -21
  88. package/package.json +2 -2
@@ -17,6 +17,7 @@
17
17
  * @see [source](https://github.com/nodejs/node/blob/v24.x/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): Buffer;
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): Buffer;
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): Buffer;
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): Buffer;
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(): Buffer;
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(): Buffer;
500
+ digest(): NonSharedBuffer;
500
501
  digest(encoding: BinaryToTextEncoding): string;
501
502
  }
502
503
  type KeyObjectType = "secret" | "public" | "private";
@@ -636,8 +637,8 @@ declare module "crypto" {
636
637
  * PKCS#1 and SEC1 encryption.
637
638
  * @since v11.6.0
638
639
  */
639
- export(options: KeyExportOptions<"pem">): string | Buffer;
640
- export(options?: KeyExportOptions<"der">): Buffer;
640
+ export(options: KeyExportOptions<"pem">): string | NonSharedBuffer;
641
+ export(options?: KeyExportOptions<"der">): NonSharedBuffer;
641
642
  export(options?: JwkKeyExportOptions): JsonWebKey;
642
643
  /**
643
644
  * Returns `true` or `false` depending on whether the keys have exactly the same
@@ -886,8 +887,8 @@ declare module "crypto" {
886
887
  * @param inputEncoding The `encoding` of the data.
887
888
  * @param outputEncoding The `encoding` of the return value.
888
889
  */
889
- update(data: BinaryLike): Buffer;
890
- update(data: string, inputEncoding: Encoding): Buffer;
890
+ update(data: BinaryLike): NonSharedBuffer;
891
+ update(data: string, inputEncoding: Encoding): NonSharedBuffer;
891
892
  update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
892
893
  update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
893
894
  /**
@@ -898,7 +899,7 @@ declare module "crypto" {
898
899
  * @param outputEncoding The `encoding` of the return value.
899
900
  * @return Any remaining enciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
900
901
  */
901
- final(): Buffer;
902
+ final(): NonSharedBuffer;
902
903
  final(outputEncoding: BufferEncoding): string;
903
904
  /**
904
905
  * When using block encryption algorithms, the `Cipheriv` class will automatically
@@ -924,7 +925,7 @@ declare module "crypto" {
924
925
  plaintextLength: number;
925
926
  },
926
927
  ): this;
927
- getAuthTag(): Buffer;
928
+ getAuthTag(): NonSharedBuffer;
928
929
  }
929
930
  interface CipherGCM extends Cipheriv {
930
931
  setAAD(
@@ -933,7 +934,7 @@ declare module "crypto" {
933
934
  plaintextLength: number;
934
935
  },
935
936
  ): this;
936
- getAuthTag(): Buffer;
937
+ getAuthTag(): NonSharedBuffer;
937
938
  }
938
939
  interface CipherOCB extends Cipheriv {
939
940
  setAAD(
@@ -942,7 +943,7 @@ declare module "crypto" {
942
943
  plaintextLength: number;
943
944
  },
944
945
  ): this;
945
- getAuthTag(): Buffer;
946
+ getAuthTag(): NonSharedBuffer;
946
947
  }
947
948
  interface CipherChaCha20Poly1305 extends Cipheriv {
948
949
  setAAD(
@@ -951,7 +952,7 @@ declare module "crypto" {
951
952
  plaintextLength: number;
952
953
  },
953
954
  ): this;
954
- getAuthTag(): Buffer;
955
+ getAuthTag(): NonSharedBuffer;
955
956
  }
956
957
  /**
957
958
  * Creates and returns a `Decipheriv` object that uses the given `algorithm`, `key` and initialization vector (`iv`).
@@ -1136,8 +1137,8 @@ declare module "crypto" {
1136
1137
  * @param inputEncoding The `encoding` of the `data` string.
1137
1138
  * @param outputEncoding The `encoding` of the return value.
1138
1139
  */
1139
- update(data: NodeJS.ArrayBufferView): Buffer;
1140
- update(data: string, inputEncoding: Encoding): Buffer;
1140
+ update(data: NodeJS.ArrayBufferView): NonSharedBuffer;
1141
+ update(data: string, inputEncoding: Encoding): NonSharedBuffer;
1141
1142
  update(data: NodeJS.ArrayBufferView, inputEncoding: undefined, outputEncoding: Encoding): string;
1142
1143
  update(data: string, inputEncoding: Encoding | undefined, outputEncoding: Encoding): string;
1143
1144
  /**
@@ -1148,7 +1149,7 @@ declare module "crypto" {
1148
1149
  * @param outputEncoding The `encoding` of the return value.
1149
1150
  * @return Any remaining deciphered contents. If `outputEncoding` is specified, a string is returned. If an `outputEncoding` is not provided, a {@link Buffer} is returned.
1150
1151
  */
1151
- final(): Buffer;
1152
+ final(): NonSharedBuffer;
1152
1153
  final(outputEncoding: BufferEncoding): string;
1153
1154
  /**
1154
1155
  * 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
@@ -1310,6 +1311,7 @@ declare module "crypto" {
1310
1311
  * @since v0.1.92
1311
1312
  * @param options `stream.Writable` options
1312
1313
  */
1314
+ // TODO: signing algorithm type
1313
1315
  function createSign(algorithm: string, options?: stream.WritableOptions): Sign;
1314
1316
  type DSAEncoding = "der" | "ieee-p1363";
1315
1317
  interface SigningOptions {
@@ -1319,6 +1321,7 @@ declare module "crypto" {
1319
1321
  padding?: number | undefined;
1320
1322
  saltLength?: number | undefined;
1321
1323
  dsaEncoding?: DSAEncoding | undefined;
1324
+ context?: ArrayBuffer | NodeJS.ArrayBufferView | undefined;
1322
1325
  }
1323
1326
  interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {}
1324
1327
  interface SignKeyObjectInput extends SigningOptions {
@@ -1420,7 +1423,7 @@ declare module "crypto" {
1420
1423
  * called. Multiple calls to `sign.sign()` will result in an error being thrown.
1421
1424
  * @since v0.1.92
1422
1425
  */
1423
- sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput): Buffer;
1426
+ sign(privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput): NonSharedBuffer;
1424
1427
  sign(
1425
1428
  privateKey: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
1426
1429
  outputFormat: BinaryToTextEncoding,
@@ -1579,7 +1582,7 @@ declare module "crypto" {
1579
1582
  * @since v0.5.0
1580
1583
  * @param encoding The `encoding` of the return value.
1581
1584
  */
1582
- generateKeys(): Buffer;
1585
+ generateKeys(): NonSharedBuffer;
1583
1586
  generateKeys(encoding: BinaryToTextEncoding): string;
1584
1587
  /**
1585
1588
  * Computes the shared secret using `otherPublicKey` as the other
@@ -1594,8 +1597,16 @@ declare module "crypto" {
1594
1597
  * @param inputEncoding The `encoding` of an `otherPublicKey` string.
1595
1598
  * @param outputEncoding The `encoding` of the return value.
1596
1599
  */
1597
- computeSecret(otherPublicKey: NodeJS.ArrayBufferView, inputEncoding?: null, outputEncoding?: null): Buffer;
1598
- computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding, outputEncoding?: null): Buffer;
1600
+ computeSecret(
1601
+ otherPublicKey: NodeJS.ArrayBufferView,
1602
+ inputEncoding?: null,
1603
+ outputEncoding?: null,
1604
+ ): NonSharedBuffer;
1605
+ computeSecret(
1606
+ otherPublicKey: string,
1607
+ inputEncoding: BinaryToTextEncoding,
1608
+ outputEncoding?: null,
1609
+ ): NonSharedBuffer;
1599
1610
  computeSecret(
1600
1611
  otherPublicKey: NodeJS.ArrayBufferView,
1601
1612
  inputEncoding: null,
@@ -1613,7 +1624,7 @@ declare module "crypto" {
1613
1624
  * @since v0.5.0
1614
1625
  * @param encoding The `encoding` of the return value.
1615
1626
  */
1616
- getPrime(): Buffer;
1627
+ getPrime(): NonSharedBuffer;
1617
1628
  getPrime(encoding: BinaryToTextEncoding): string;
1618
1629
  /**
1619
1630
  * Returns the Diffie-Hellman generator in the specified `encoding`.
@@ -1622,7 +1633,7 @@ declare module "crypto" {
1622
1633
  * @since v0.5.0
1623
1634
  * @param encoding The `encoding` of the return value.
1624
1635
  */
1625
- getGenerator(): Buffer;
1636
+ getGenerator(): NonSharedBuffer;
1626
1637
  getGenerator(encoding: BinaryToTextEncoding): string;
1627
1638
  /**
1628
1639
  * Returns the Diffie-Hellman public key in the specified `encoding`.
@@ -1631,7 +1642,7 @@ declare module "crypto" {
1631
1642
  * @since v0.5.0
1632
1643
  * @param encoding The `encoding` of the return value.
1633
1644
  */
1634
- getPublicKey(): Buffer;
1645
+ getPublicKey(): NonSharedBuffer;
1635
1646
  getPublicKey(encoding: BinaryToTextEncoding): string;
1636
1647
  /**
1637
1648
  * Returns the Diffie-Hellman private key in the specified `encoding`.
@@ -1640,7 +1651,7 @@ declare module "crypto" {
1640
1651
  * @since v0.5.0
1641
1652
  * @param encoding The `encoding` of the return value.
1642
1653
  */
1643
- getPrivateKey(): Buffer;
1654
+ getPrivateKey(): NonSharedBuffer;
1644
1655
  getPrivateKey(encoding: BinaryToTextEncoding): string;
1645
1656
  /**
1646
1657
  * Sets the Diffie-Hellman public key. If the `encoding` argument is provided, `publicKey` is expected
@@ -1784,7 +1795,7 @@ declare module "crypto" {
1784
1795
  iterations: number,
1785
1796
  keylen: number,
1786
1797
  digest: string,
1787
- callback: (err: Error | null, derivedKey: Buffer) => void,
1798
+ callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
1788
1799
  ): void;
1789
1800
  /**
1790
1801
  * Provides a synchronous Password-Based Key Derivation Function 2 (PBKDF2)
@@ -1821,7 +1832,7 @@ declare module "crypto" {
1821
1832
  iterations: number,
1822
1833
  keylen: number,
1823
1834
  digest: string,
1824
- ): Buffer;
1835
+ ): NonSharedBuffer;
1825
1836
  /**
1826
1837
  * Generates cryptographically strong pseudorandom data. The `size` argument
1827
1838
  * is a number indicating the number of bytes to generate.
@@ -1874,10 +1885,10 @@ declare module "crypto" {
1874
1885
  * @param size The number of bytes to generate. The `size` must not be larger than `2**31 - 1`.
1875
1886
  * @return if the `callback` function is not provided.
1876
1887
  */
1877
- function randomBytes(size: number): Buffer;
1878
- function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
1879
- function pseudoRandomBytes(size: number): Buffer;
1880
- function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
1888
+ function randomBytes(size: number): NonSharedBuffer;
1889
+ function randomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void;
1890
+ function pseudoRandomBytes(size: number): NonSharedBuffer;
1891
+ function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: NonSharedBuffer) => void): void;
1881
1892
  /**
1882
1893
  * Return a random integer `n` such that `min <= n < max`. This
1883
1894
  * implementation avoids [modulo bias](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias).
@@ -2107,14 +2118,14 @@ declare module "crypto" {
2107
2118
  password: BinaryLike,
2108
2119
  salt: BinaryLike,
2109
2120
  keylen: number,
2110
- callback: (err: Error | null, derivedKey: Buffer) => void,
2121
+ callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
2111
2122
  ): void;
2112
2123
  function scrypt(
2113
2124
  password: BinaryLike,
2114
2125
  salt: BinaryLike,
2115
2126
  keylen: number,
2116
2127
  options: ScryptOptions,
2117
- callback: (err: Error | null, derivedKey: Buffer) => void,
2128
+ callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
2118
2129
  ): void;
2119
2130
  /**
2120
2131
  * Provides a synchronous [scrypt](https://en.wikipedia.org/wiki/Scrypt) implementation. Scrypt is a password-based
@@ -2146,7 +2157,12 @@ declare module "crypto" {
2146
2157
  * ```
2147
2158
  * @since v10.5.0
2148
2159
  */
2149
- function scryptSync(password: BinaryLike, salt: BinaryLike, keylen: number, options?: ScryptOptions): Buffer;
2160
+ function scryptSync(
2161
+ password: BinaryLike,
2162
+ salt: BinaryLike,
2163
+ keylen: number,
2164
+ options?: ScryptOptions,
2165
+ ): NonSharedBuffer;
2150
2166
  interface RsaPublicKey {
2151
2167
  key: KeyLike;
2152
2168
  padding?: number | undefined;
@@ -2175,7 +2191,7 @@ declare module "crypto" {
2175
2191
  function publicEncrypt(
2176
2192
  key: RsaPublicKey | RsaPrivateKey | KeyLike,
2177
2193
  buffer: NodeJS.ArrayBufferView | string,
2178
- ): Buffer;
2194
+ ): NonSharedBuffer;
2179
2195
  /**
2180
2196
  * Decrypts `buffer` with `key`.`buffer` was previously encrypted using
2181
2197
  * the corresponding private key, for example using {@link privateEncrypt}.
@@ -2190,7 +2206,7 @@ declare module "crypto" {
2190
2206
  function publicDecrypt(
2191
2207
  key: RsaPublicKey | RsaPrivateKey | KeyLike,
2192
2208
  buffer: NodeJS.ArrayBufferView | string,
2193
- ): Buffer;
2209
+ ): NonSharedBuffer;
2194
2210
  /**
2195
2211
  * Decrypts `buffer` with `privateKey`. `buffer` was previously encrypted using
2196
2212
  * the corresponding public key, for example using {@link publicEncrypt}.
@@ -2199,7 +2215,10 @@ declare module "crypto" {
2199
2215
  * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_OAEP_PADDING`.
2200
2216
  * @since v0.11.14
2201
2217
  */
2202
- function privateDecrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView | string): Buffer;
2218
+ function privateDecrypt(
2219
+ privateKey: RsaPrivateKey | KeyLike,
2220
+ buffer: NodeJS.ArrayBufferView | string,
2221
+ ): NonSharedBuffer;
2203
2222
  /**
2204
2223
  * Encrypts `buffer` with `privateKey`. The returned data can be decrypted using
2205
2224
  * the corresponding public key, for example using {@link publicDecrypt}.
@@ -2208,7 +2227,10 @@ declare module "crypto" {
2208
2227
  * object, the `padding` property can be passed. Otherwise, this function uses `RSA_PKCS1_PADDING`.
2209
2228
  * @since v1.1.0
2210
2229
  */
2211
- function privateEncrypt(privateKey: RsaPrivateKey | KeyLike, buffer: NodeJS.ArrayBufferView | string): Buffer;
2230
+ function privateEncrypt(
2231
+ privateKey: RsaPrivateKey | KeyLike,
2232
+ buffer: NodeJS.ArrayBufferView | string,
2233
+ ): NonSharedBuffer;
2212
2234
  /**
2213
2235
  * ```js
2214
2236
  * const {
@@ -2337,7 +2359,7 @@ declare module "crypto" {
2337
2359
  inputEncoding?: BinaryToTextEncoding,
2338
2360
  outputEncoding?: "latin1" | "hex" | "base64" | "base64url",
2339
2361
  format?: "uncompressed" | "compressed" | "hybrid",
2340
- ): Buffer | string;
2362
+ ): NonSharedBuffer | string;
2341
2363
  /**
2342
2364
  * Generates private and public EC Diffie-Hellman key values, and returns
2343
2365
  * the public key in the specified `format` and `encoding`. This key should be
@@ -2350,7 +2372,7 @@ declare module "crypto" {
2350
2372
  * @param encoding The `encoding` of the return value.
2351
2373
  * @param [format='uncompressed']
2352
2374
  */
2353
- generateKeys(): Buffer;
2375
+ generateKeys(): NonSharedBuffer;
2354
2376
  generateKeys(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
2355
2377
  /**
2356
2378
  * Computes the shared secret using `otherPublicKey` as the other
@@ -2369,8 +2391,8 @@ declare module "crypto" {
2369
2391
  * @param inputEncoding The `encoding` of the `otherPublicKey` string.
2370
2392
  * @param outputEncoding The `encoding` of the return value.
2371
2393
  */
2372
- computeSecret(otherPublicKey: NodeJS.ArrayBufferView): Buffer;
2373
- computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): Buffer;
2394
+ computeSecret(otherPublicKey: NodeJS.ArrayBufferView): NonSharedBuffer;
2395
+ computeSecret(otherPublicKey: string, inputEncoding: BinaryToTextEncoding): NonSharedBuffer;
2374
2396
  computeSecret(otherPublicKey: NodeJS.ArrayBufferView, outputEncoding: BinaryToTextEncoding): string;
2375
2397
  computeSecret(
2376
2398
  otherPublicKey: string,
@@ -2384,7 +2406,7 @@ declare module "crypto" {
2384
2406
  * @param encoding The `encoding` of the return value.
2385
2407
  * @return The EC Diffie-Hellman in the specified `encoding`.
2386
2408
  */
2387
- getPrivateKey(): Buffer;
2409
+ getPrivateKey(): NonSharedBuffer;
2388
2410
  getPrivateKey(encoding: BinaryToTextEncoding): string;
2389
2411
  /**
2390
2412
  * 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.
@@ -2396,7 +2418,7 @@ declare module "crypto" {
2396
2418
  * @param [format='uncompressed']
2397
2419
  * @return The EC Diffie-Hellman public key in the specified `encoding` and `format`.
2398
2420
  */
2399
- getPublicKey(encoding?: null, format?: ECDHKeyFormat): Buffer;
2421
+ getPublicKey(encoding?: null, format?: ECDHKeyFormat): NonSharedBuffer;
2400
2422
  getPublicKey(encoding: BinaryToTextEncoding, format?: ECDHKeyFormat): string;
2401
2423
  /**
2402
2424
  * Sets the EC Diffie-Hellman private key.
@@ -2460,6 +2482,18 @@ declare module "crypto" {
2460
2482
  | "ml-kem-768"
2461
2483
  | "rsa-pss"
2462
2484
  | "rsa"
2485
+ | "slh-dsa-sha2-128f"
2486
+ | "slh-dsa-sha2-128s"
2487
+ | "slh-dsa-sha2-192f"
2488
+ | "slh-dsa-sha2-192s"
2489
+ | "slh-dsa-sha2-256f"
2490
+ | "slh-dsa-sha2-256s"
2491
+ | "slh-dsa-shake-128f"
2492
+ | "slh-dsa-shake-128s"
2493
+ | "slh-dsa-shake-192f"
2494
+ | "slh-dsa-shake-192s"
2495
+ | "slh-dsa-shake-256f"
2496
+ | "slh-dsa-shake-256s"
2463
2497
  | "x25519"
2464
2498
  | "x448";
2465
2499
  type KeyFormat = "pem" | "der" | "jwk";
@@ -2478,6 +2512,7 @@ declare module "crypto" {
2478
2512
  interface X448KeyPairKeyObjectOptions {}
2479
2513
  interface MLDSAKeyPairKeyObjectOptions {}
2480
2514
  interface MLKEMKeyPairKeyObjectOptions {}
2515
+ interface SLHDSAKeyPairKeyObjectOptions {}
2481
2516
  interface ECKeyPairKeyObjectOptions {
2482
2517
  /**
2483
2518
  * Name of the curve to use
@@ -2660,6 +2695,15 @@ declare module "crypto" {
2660
2695
  type: "pkcs8";
2661
2696
  };
2662
2697
  }
2698
+ interface SLHDSAKeyPairOptions<PubF extends KeyFormat, PrivF extends KeyFormat> {
2699
+ publicKeyEncoding: {
2700
+ type: "spki";
2701
+ format: PubF;
2702
+ };
2703
+ privateKeyEncoding: BasePrivateKeyEncodingOptions<PrivF> & {
2704
+ type: "pkcs8";
2705
+ };
2706
+ }
2663
2707
  interface KeyPairSyncResult<T1 extends string | Buffer, T2 extends string | Buffer> {
2664
2708
  publicKey: T1;
2665
2709
  privateKey: T2;
@@ -2713,15 +2757,15 @@ declare module "crypto" {
2713
2757
  function generateKeyPairSync(
2714
2758
  type: "rsa",
2715
2759
  options: RSAKeyPairOptions<"pem", "der">,
2716
- ): KeyPairSyncResult<string, Buffer>;
2760
+ ): KeyPairSyncResult<string, NonSharedBuffer>;
2717
2761
  function generateKeyPairSync(
2718
2762
  type: "rsa",
2719
2763
  options: RSAKeyPairOptions<"der", "pem">,
2720
- ): KeyPairSyncResult<Buffer, string>;
2764
+ ): KeyPairSyncResult<NonSharedBuffer, string>;
2721
2765
  function generateKeyPairSync(
2722
2766
  type: "rsa",
2723
2767
  options: RSAKeyPairOptions<"der", "der">,
2724
- ): KeyPairSyncResult<Buffer, Buffer>;
2768
+ ): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
2725
2769
  function generateKeyPairSync(type: "rsa", options: RSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2726
2770
  function generateKeyPairSync(
2727
2771
  type: "rsa-pss",
@@ -2730,15 +2774,15 @@ declare module "crypto" {
2730
2774
  function generateKeyPairSync(
2731
2775
  type: "rsa-pss",
2732
2776
  options: RSAPSSKeyPairOptions<"pem", "der">,
2733
- ): KeyPairSyncResult<string, Buffer>;
2777
+ ): KeyPairSyncResult<string, NonSharedBuffer>;
2734
2778
  function generateKeyPairSync(
2735
2779
  type: "rsa-pss",
2736
2780
  options: RSAPSSKeyPairOptions<"der", "pem">,
2737
- ): KeyPairSyncResult<Buffer, string>;
2781
+ ): KeyPairSyncResult<NonSharedBuffer, string>;
2738
2782
  function generateKeyPairSync(
2739
2783
  type: "rsa-pss",
2740
2784
  options: RSAPSSKeyPairOptions<"der", "der">,
2741
- ): KeyPairSyncResult<Buffer, Buffer>;
2785
+ ): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
2742
2786
  function generateKeyPairSync(type: "rsa-pss", options: RSAPSSKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2743
2787
  function generateKeyPairSync(
2744
2788
  type: "dsa",
@@ -2747,15 +2791,15 @@ declare module "crypto" {
2747
2791
  function generateKeyPairSync(
2748
2792
  type: "dsa",
2749
2793
  options: DSAKeyPairOptions<"pem", "der">,
2750
- ): KeyPairSyncResult<string, Buffer>;
2794
+ ): KeyPairSyncResult<string, NonSharedBuffer>;
2751
2795
  function generateKeyPairSync(
2752
2796
  type: "dsa",
2753
2797
  options: DSAKeyPairOptions<"der", "pem">,
2754
- ): KeyPairSyncResult<Buffer, string>;
2798
+ ): KeyPairSyncResult<NonSharedBuffer, string>;
2755
2799
  function generateKeyPairSync(
2756
2800
  type: "dsa",
2757
2801
  options: DSAKeyPairOptions<"der", "der">,
2758
- ): KeyPairSyncResult<Buffer, Buffer>;
2802
+ ): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
2759
2803
  function generateKeyPairSync(type: "dsa", options: DSAKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2760
2804
  function generateKeyPairSync(
2761
2805
  type: "ec",
@@ -2764,15 +2808,15 @@ declare module "crypto" {
2764
2808
  function generateKeyPairSync(
2765
2809
  type: "ec",
2766
2810
  options: ECKeyPairOptions<"pem", "der">,
2767
- ): KeyPairSyncResult<string, Buffer>;
2811
+ ): KeyPairSyncResult<string, NonSharedBuffer>;
2768
2812
  function generateKeyPairSync(
2769
2813
  type: "ec",
2770
2814
  options: ECKeyPairOptions<"der", "pem">,
2771
- ): KeyPairSyncResult<Buffer, string>;
2815
+ ): KeyPairSyncResult<NonSharedBuffer, string>;
2772
2816
  function generateKeyPairSync(
2773
2817
  type: "ec",
2774
2818
  options: ECKeyPairOptions<"der", "der">,
2775
- ): KeyPairSyncResult<Buffer, Buffer>;
2819
+ ): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
2776
2820
  function generateKeyPairSync(type: "ec", options: ECKeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2777
2821
  function generateKeyPairSync(
2778
2822
  type: "ed25519",
@@ -2781,15 +2825,15 @@ declare module "crypto" {
2781
2825
  function generateKeyPairSync(
2782
2826
  type: "ed25519",
2783
2827
  options: ED25519KeyPairOptions<"pem", "der">,
2784
- ): KeyPairSyncResult<string, Buffer>;
2828
+ ): KeyPairSyncResult<string, NonSharedBuffer>;
2785
2829
  function generateKeyPairSync(
2786
2830
  type: "ed25519",
2787
2831
  options: ED25519KeyPairOptions<"der", "pem">,
2788
- ): KeyPairSyncResult<Buffer, string>;
2832
+ ): KeyPairSyncResult<NonSharedBuffer, string>;
2789
2833
  function generateKeyPairSync(
2790
2834
  type: "ed25519",
2791
2835
  options: ED25519KeyPairOptions<"der", "der">,
2792
- ): KeyPairSyncResult<Buffer, Buffer>;
2836
+ ): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
2793
2837
  function generateKeyPairSync(type: "ed25519", options?: ED25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2794
2838
  function generateKeyPairSync(
2795
2839
  type: "ed448",
@@ -2798,15 +2842,15 @@ declare module "crypto" {
2798
2842
  function generateKeyPairSync(
2799
2843
  type: "ed448",
2800
2844
  options: ED448KeyPairOptions<"pem", "der">,
2801
- ): KeyPairSyncResult<string, Buffer>;
2845
+ ): KeyPairSyncResult<string, NonSharedBuffer>;
2802
2846
  function generateKeyPairSync(
2803
2847
  type: "ed448",
2804
2848
  options: ED448KeyPairOptions<"der", "pem">,
2805
- ): KeyPairSyncResult<Buffer, string>;
2849
+ ): KeyPairSyncResult<NonSharedBuffer, string>;
2806
2850
  function generateKeyPairSync(
2807
2851
  type: "ed448",
2808
2852
  options: ED448KeyPairOptions<"der", "der">,
2809
- ): KeyPairSyncResult<Buffer, Buffer>;
2853
+ ): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
2810
2854
  function generateKeyPairSync(type: "ed448", options?: ED448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2811
2855
  function generateKeyPairSync(
2812
2856
  type: "x25519",
@@ -2815,15 +2859,15 @@ declare module "crypto" {
2815
2859
  function generateKeyPairSync(
2816
2860
  type: "x25519",
2817
2861
  options: X25519KeyPairOptions<"pem", "der">,
2818
- ): KeyPairSyncResult<string, Buffer>;
2862
+ ): KeyPairSyncResult<string, NonSharedBuffer>;
2819
2863
  function generateKeyPairSync(
2820
2864
  type: "x25519",
2821
2865
  options: X25519KeyPairOptions<"der", "pem">,
2822
- ): KeyPairSyncResult<Buffer, string>;
2866
+ ): KeyPairSyncResult<NonSharedBuffer, string>;
2823
2867
  function generateKeyPairSync(
2824
2868
  type: "x25519",
2825
2869
  options: X25519KeyPairOptions<"der", "der">,
2826
- ): KeyPairSyncResult<Buffer, Buffer>;
2870
+ ): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
2827
2871
  function generateKeyPairSync(type: "x25519", options?: X25519KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2828
2872
  function generateKeyPairSync(
2829
2873
  type: "x448",
@@ -2832,15 +2876,15 @@ declare module "crypto" {
2832
2876
  function generateKeyPairSync(
2833
2877
  type: "x448",
2834
2878
  options: X448KeyPairOptions<"pem", "der">,
2835
- ): KeyPairSyncResult<string, Buffer>;
2879
+ ): KeyPairSyncResult<string, NonSharedBuffer>;
2836
2880
  function generateKeyPairSync(
2837
2881
  type: "x448",
2838
2882
  options: X448KeyPairOptions<"der", "pem">,
2839
- ): KeyPairSyncResult<Buffer, string>;
2883
+ ): KeyPairSyncResult<NonSharedBuffer, string>;
2840
2884
  function generateKeyPairSync(
2841
2885
  type: "x448",
2842
2886
  options: X448KeyPairOptions<"der", "der">,
2843
- ): KeyPairSyncResult<Buffer, Buffer>;
2887
+ ): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
2844
2888
  function generateKeyPairSync(type: "x448", options?: X448KeyPairKeyObjectOptions): KeyPairKeyObjectResult;
2845
2889
  function generateKeyPairSync(
2846
2890
  type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
@@ -2849,15 +2893,15 @@ declare module "crypto" {
2849
2893
  function generateKeyPairSync(
2850
2894
  type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
2851
2895
  options: MLDSAKeyPairOptions<"pem", "der">,
2852
- ): KeyPairSyncResult<string, Buffer>;
2896
+ ): KeyPairSyncResult<string, NonSharedBuffer>;
2853
2897
  function generateKeyPairSync(
2854
2898
  type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
2855
2899
  options: MLDSAKeyPairOptions<"der", "pem">,
2856
- ): KeyPairSyncResult<Buffer, string>;
2900
+ ): KeyPairSyncResult<NonSharedBuffer, string>;
2857
2901
  function generateKeyPairSync(
2858
2902
  type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
2859
2903
  options: MLDSAKeyPairOptions<"der", "der">,
2860
- ): KeyPairSyncResult<Buffer, Buffer>;
2904
+ ): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
2861
2905
  function generateKeyPairSync(
2862
2906
  type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
2863
2907
  options?: MLDSAKeyPairKeyObjectOptions,
@@ -2869,19 +2913,99 @@ declare module "crypto" {
2869
2913
  function generateKeyPairSync(
2870
2914
  type: "ml-kem-1024" | "ml-kem-512" | "ml-kem-768",
2871
2915
  options: MLKEMKeyPairOptions<"pem", "der">,
2872
- ): KeyPairSyncResult<string, Buffer>;
2916
+ ): KeyPairSyncResult<string, NonSharedBuffer>;
2873
2917
  function generateKeyPairSync(
2874
2918
  type: "ml-kem-1024" | "ml-kem-512" | "ml-kem-768",
2875
2919
  options: MLKEMKeyPairOptions<"der", "pem">,
2876
- ): KeyPairSyncResult<Buffer, string>;
2920
+ ): KeyPairSyncResult<NonSharedBuffer, string>;
2877
2921
  function generateKeyPairSync(
2878
2922
  type: "ml-kem-1024" | "ml-kem-512" | "ml-kem-768",
2879
2923
  options: MLKEMKeyPairOptions<"der", "der">,
2880
- ): KeyPairSyncResult<Buffer, Buffer>;
2924
+ ): KeyPairSyncResult<NonSharedBuffer, NonSharedBuffer>;
2881
2925
  function generateKeyPairSync(
2882
2926
  type: "ml-kem-1024" | "ml-kem-512" | "ml-kem-768",
2883
2927
  options?: MLKEMKeyPairKeyObjectOptions,
2884
2928
  ): KeyPairKeyObjectResult;
2929
+ function generateKeyPairSync(
2930
+ type:
2931
+ | "slh-dsa-sha2-128f"
2932
+ | "slh-dsa-sha2-128s"
2933
+ | "slh-dsa-sha2-192f"
2934
+ | "slh-dsa-sha2-192s"
2935
+ | "slh-dsa-sha2-256f"
2936
+ | "slh-dsa-sha2-256s"
2937
+ | "slh-dsa-shake-128f"
2938
+ | "slh-dsa-shake-128s"
2939
+ | "slh-dsa-shake-192f"
2940
+ | "slh-dsa-shake-192s"
2941
+ | "slh-dsa-shake-256f"
2942
+ | "slh-dsa-shake-256s",
2943
+ options: SLHDSAKeyPairOptions<"pem", "pem">,
2944
+ ): KeyPairSyncResult<string, string>;
2945
+ function generateKeyPairSync(
2946
+ type:
2947
+ | "slh-dsa-sha2-128f"
2948
+ | "slh-dsa-sha2-128s"
2949
+ | "slh-dsa-sha2-192f"
2950
+ | "slh-dsa-sha2-192s"
2951
+ | "slh-dsa-sha2-256f"
2952
+ | "slh-dsa-sha2-256s"
2953
+ | "slh-dsa-shake-128f"
2954
+ | "slh-dsa-shake-128s"
2955
+ | "slh-dsa-shake-192f"
2956
+ | "slh-dsa-shake-192s"
2957
+ | "slh-dsa-shake-256f"
2958
+ | "slh-dsa-shake-256s",
2959
+ options: SLHDSAKeyPairOptions<"pem", "der">,
2960
+ ): KeyPairSyncResult<string, Buffer>;
2961
+ function generateKeyPairSync(
2962
+ type:
2963
+ | "slh-dsa-sha2-128f"
2964
+ | "slh-dsa-sha2-128s"
2965
+ | "slh-dsa-sha2-192f"
2966
+ | "slh-dsa-sha2-192s"
2967
+ | "slh-dsa-sha2-256f"
2968
+ | "slh-dsa-sha2-256s"
2969
+ | "slh-dsa-shake-128f"
2970
+ | "slh-dsa-shake-128s"
2971
+ | "slh-dsa-shake-192f"
2972
+ | "slh-dsa-shake-192s"
2973
+ | "slh-dsa-shake-256f"
2974
+ | "slh-dsa-shake-256s",
2975
+ options: SLHDSAKeyPairOptions<"der", "pem">,
2976
+ ): KeyPairSyncResult<Buffer, string>;
2977
+ function generateKeyPairSync(
2978
+ type:
2979
+ | "slh-dsa-sha2-128f"
2980
+ | "slh-dsa-sha2-128s"
2981
+ | "slh-dsa-sha2-192f"
2982
+ | "slh-dsa-sha2-192s"
2983
+ | "slh-dsa-sha2-256f"
2984
+ | "slh-dsa-sha2-256s"
2985
+ | "slh-dsa-shake-128f"
2986
+ | "slh-dsa-shake-128s"
2987
+ | "slh-dsa-shake-192f"
2988
+ | "slh-dsa-shake-192s"
2989
+ | "slh-dsa-shake-256f"
2990
+ | "slh-dsa-shake-256s",
2991
+ options: SLHDSAKeyPairOptions<"der", "der">,
2992
+ ): KeyPairSyncResult<Buffer, Buffer>;
2993
+ function generateKeyPairSync(
2994
+ type:
2995
+ | "slh-dsa-sha2-128f"
2996
+ | "slh-dsa-sha2-128s"
2997
+ | "slh-dsa-sha2-192f"
2998
+ | "slh-dsa-sha2-192s"
2999
+ | "slh-dsa-sha2-256f"
3000
+ | "slh-dsa-sha2-256s"
3001
+ | "slh-dsa-shake-128f"
3002
+ | "slh-dsa-shake-128s"
3003
+ | "slh-dsa-shake-192f"
3004
+ | "slh-dsa-shake-192s"
3005
+ | "slh-dsa-shake-256f"
3006
+ | "slh-dsa-shake-256s",
3007
+ options?: SLHDSAKeyPairKeyObjectOptions,
3008
+ ): KeyPairKeyObjectResult;
2885
3009
  /**
2886
3010
  * Generates a new asymmetric key pair of the given `type`. RSA, RSA-PSS, DSA, EC,
2887
3011
  * Ed25519, Ed448, X25519, X448, and DH are currently supported.
@@ -2930,17 +3054,17 @@ declare module "crypto" {
2930
3054
  function generateKeyPair(
2931
3055
  type: "rsa",
2932
3056
  options: RSAKeyPairOptions<"pem", "der">,
2933
- callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
3057
+ callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
2934
3058
  ): void;
2935
3059
  function generateKeyPair(
2936
3060
  type: "rsa",
2937
3061
  options: RSAKeyPairOptions<"der", "pem">,
2938
- callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
3062
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
2939
3063
  ): void;
2940
3064
  function generateKeyPair(
2941
3065
  type: "rsa",
2942
3066
  options: RSAKeyPairOptions<"der", "der">,
2943
- callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
3067
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
2944
3068
  ): void;
2945
3069
  function generateKeyPair(
2946
3070
  type: "rsa",
@@ -2955,17 +3079,17 @@ declare module "crypto" {
2955
3079
  function generateKeyPair(
2956
3080
  type: "rsa-pss",
2957
3081
  options: RSAPSSKeyPairOptions<"pem", "der">,
2958
- callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
3082
+ callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
2959
3083
  ): void;
2960
3084
  function generateKeyPair(
2961
3085
  type: "rsa-pss",
2962
3086
  options: RSAPSSKeyPairOptions<"der", "pem">,
2963
- callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
3087
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
2964
3088
  ): void;
2965
3089
  function generateKeyPair(
2966
3090
  type: "rsa-pss",
2967
3091
  options: RSAPSSKeyPairOptions<"der", "der">,
2968
- callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
3092
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
2969
3093
  ): void;
2970
3094
  function generateKeyPair(
2971
3095
  type: "rsa-pss",
@@ -2980,17 +3104,17 @@ declare module "crypto" {
2980
3104
  function generateKeyPair(
2981
3105
  type: "dsa",
2982
3106
  options: DSAKeyPairOptions<"pem", "der">,
2983
- callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
3107
+ callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
2984
3108
  ): void;
2985
3109
  function generateKeyPair(
2986
3110
  type: "dsa",
2987
3111
  options: DSAKeyPairOptions<"der", "pem">,
2988
- callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
3112
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
2989
3113
  ): void;
2990
3114
  function generateKeyPair(
2991
3115
  type: "dsa",
2992
3116
  options: DSAKeyPairOptions<"der", "der">,
2993
- callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
3117
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
2994
3118
  ): void;
2995
3119
  function generateKeyPair(
2996
3120
  type: "dsa",
@@ -3005,17 +3129,17 @@ declare module "crypto" {
3005
3129
  function generateKeyPair(
3006
3130
  type: "ec",
3007
3131
  options: ECKeyPairOptions<"pem", "der">,
3008
- callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
3132
+ callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
3009
3133
  ): void;
3010
3134
  function generateKeyPair(
3011
3135
  type: "ec",
3012
3136
  options: ECKeyPairOptions<"der", "pem">,
3013
- callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
3137
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
3014
3138
  ): void;
3015
3139
  function generateKeyPair(
3016
3140
  type: "ec",
3017
3141
  options: ECKeyPairOptions<"der", "der">,
3018
- callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
3142
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
3019
3143
  ): void;
3020
3144
  function generateKeyPair(
3021
3145
  type: "ec",
@@ -3030,17 +3154,17 @@ declare module "crypto" {
3030
3154
  function generateKeyPair(
3031
3155
  type: "ed25519",
3032
3156
  options: ED25519KeyPairOptions<"pem", "der">,
3033
- callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
3157
+ callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
3034
3158
  ): void;
3035
3159
  function generateKeyPair(
3036
3160
  type: "ed25519",
3037
3161
  options: ED25519KeyPairOptions<"der", "pem">,
3038
- callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
3162
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
3039
3163
  ): void;
3040
3164
  function generateKeyPair(
3041
3165
  type: "ed25519",
3042
3166
  options: ED25519KeyPairOptions<"der", "der">,
3043
- callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
3167
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
3044
3168
  ): void;
3045
3169
  function generateKeyPair(
3046
3170
  type: "ed25519",
@@ -3055,17 +3179,17 @@ declare module "crypto" {
3055
3179
  function generateKeyPair(
3056
3180
  type: "ed448",
3057
3181
  options: ED448KeyPairOptions<"pem", "der">,
3058
- callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
3182
+ callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
3059
3183
  ): void;
3060
3184
  function generateKeyPair(
3061
3185
  type: "ed448",
3062
3186
  options: ED448KeyPairOptions<"der", "pem">,
3063
- callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
3187
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
3064
3188
  ): void;
3065
3189
  function generateKeyPair(
3066
3190
  type: "ed448",
3067
3191
  options: ED448KeyPairOptions<"der", "der">,
3068
- callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
3192
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
3069
3193
  ): void;
3070
3194
  function generateKeyPair(
3071
3195
  type: "ed448",
@@ -3080,17 +3204,17 @@ declare module "crypto" {
3080
3204
  function generateKeyPair(
3081
3205
  type: "x25519",
3082
3206
  options: X25519KeyPairOptions<"pem", "der">,
3083
- callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
3207
+ callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
3084
3208
  ): void;
3085
3209
  function generateKeyPair(
3086
3210
  type: "x25519",
3087
3211
  options: X25519KeyPairOptions<"der", "pem">,
3088
- callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
3212
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
3089
3213
  ): void;
3090
3214
  function generateKeyPair(
3091
3215
  type: "x25519",
3092
3216
  options: X25519KeyPairOptions<"der", "der">,
3093
- callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
3217
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
3094
3218
  ): void;
3095
3219
  function generateKeyPair(
3096
3220
  type: "x25519",
@@ -3105,17 +3229,17 @@ declare module "crypto" {
3105
3229
  function generateKeyPair(
3106
3230
  type: "x448",
3107
3231
  options: X448KeyPairOptions<"pem", "der">,
3108
- callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
3232
+ callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
3109
3233
  ): void;
3110
3234
  function generateKeyPair(
3111
3235
  type: "x448",
3112
3236
  options: X448KeyPairOptions<"der", "pem">,
3113
- callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
3237
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
3114
3238
  ): void;
3115
3239
  function generateKeyPair(
3116
3240
  type: "x448",
3117
3241
  options: X448KeyPairOptions<"der", "der">,
3118
- callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
3242
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
3119
3243
  ): void;
3120
3244
  function generateKeyPair(
3121
3245
  type: "x448",
@@ -3130,17 +3254,17 @@ declare module "crypto" {
3130
3254
  function generateKeyPair(
3131
3255
  type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
3132
3256
  options: MLDSAKeyPairOptions<"pem", "der">,
3133
- callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
3257
+ callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
3134
3258
  ): void;
3135
3259
  function generateKeyPair(
3136
3260
  type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
3137
3261
  options: MLDSAKeyPairOptions<"der", "pem">,
3138
- callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
3262
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
3139
3263
  ): void;
3140
3264
  function generateKeyPair(
3141
3265
  type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
3142
3266
  options: MLDSAKeyPairOptions<"der", "der">,
3143
- callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
3267
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
3144
3268
  ): void;
3145
3269
  function generateKeyPair(
3146
3270
  type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
@@ -3155,23 +3279,108 @@ declare module "crypto" {
3155
3279
  function generateKeyPair(
3156
3280
  type: "ml-kem-1024" | "ml-kem-512" | "ml-kem-768",
3157
3281
  options: MLKEMKeyPairOptions<"pem", "der">,
3158
- callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
3282
+ callback: (err: Error | null, publicKey: string, privateKey: NonSharedBuffer) => void,
3159
3283
  ): void;
3160
3284
  function generateKeyPair(
3161
3285
  type: "ml-kem-1024" | "ml-kem-512" | "ml-kem-768",
3162
3286
  options: MLKEMKeyPairOptions<"der", "pem">,
3163
- callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
3287
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: string) => void,
3164
3288
  ): void;
3165
3289
  function generateKeyPair(
3166
3290
  type: "ml-kem-1024" | "ml-kem-512" | "ml-kem-768",
3167
3291
  options: MLKEMKeyPairOptions<"der", "der">,
3168
- callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
3292
+ callback: (err: Error | null, publicKey: NonSharedBuffer, privateKey: NonSharedBuffer) => void,
3169
3293
  ): void;
3170
3294
  function generateKeyPair(
3171
3295
  type: "ml-kem-1024" | "ml-kem-512" | "ml-kem-768",
3172
3296
  options: MLKEMKeyPairKeyObjectOptions | undefined,
3173
3297
  callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
3174
3298
  ): void;
3299
+ function generateKeyPair(
3300
+ type:
3301
+ | "slh-dsa-sha2-128f"
3302
+ | "slh-dsa-sha2-128s"
3303
+ | "slh-dsa-sha2-192f"
3304
+ | "slh-dsa-sha2-192s"
3305
+ | "slh-dsa-sha2-256f"
3306
+ | "slh-dsa-sha2-256s"
3307
+ | "slh-dsa-shake-128f"
3308
+ | "slh-dsa-shake-128s"
3309
+ | "slh-dsa-shake-192f"
3310
+ | "slh-dsa-shake-192s"
3311
+ | "slh-dsa-shake-256f"
3312
+ | "slh-dsa-shake-256s",
3313
+ options: SLHDSAKeyPairOptions<"pem", "pem">,
3314
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
3315
+ ): void;
3316
+ function generateKeyPair(
3317
+ type:
3318
+ | "slh-dsa-sha2-128f"
3319
+ | "slh-dsa-sha2-128s"
3320
+ | "slh-dsa-sha2-192f"
3321
+ | "slh-dsa-sha2-192s"
3322
+ | "slh-dsa-sha2-256f"
3323
+ | "slh-dsa-sha2-256s"
3324
+ | "slh-dsa-shake-128f"
3325
+ | "slh-dsa-shake-128s"
3326
+ | "slh-dsa-shake-192f"
3327
+ | "slh-dsa-shake-192s"
3328
+ | "slh-dsa-shake-256f"
3329
+ | "slh-dsa-shake-256s",
3330
+ options: SLHDSAKeyPairOptions<"pem", "der">,
3331
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
3332
+ ): void;
3333
+ function generateKeyPair(
3334
+ type:
3335
+ | "slh-dsa-sha2-128f"
3336
+ | "slh-dsa-sha2-128s"
3337
+ | "slh-dsa-sha2-192f"
3338
+ | "slh-dsa-sha2-192s"
3339
+ | "slh-dsa-sha2-256f"
3340
+ | "slh-dsa-sha2-256s"
3341
+ | "slh-dsa-shake-128f"
3342
+ | "slh-dsa-shake-128s"
3343
+ | "slh-dsa-shake-192f"
3344
+ | "slh-dsa-shake-192s"
3345
+ | "slh-dsa-shake-256f"
3346
+ | "slh-dsa-shake-256s",
3347
+ options: SLHDSAKeyPairOptions<"der", "pem">,
3348
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
3349
+ ): void;
3350
+ function generateKeyPair(
3351
+ type:
3352
+ | "slh-dsa-sha2-128f"
3353
+ | "slh-dsa-sha2-128s"
3354
+ | "slh-dsa-sha2-192f"
3355
+ | "slh-dsa-sha2-192s"
3356
+ | "slh-dsa-sha2-256f"
3357
+ | "slh-dsa-sha2-256s"
3358
+ | "slh-dsa-shake-128f"
3359
+ | "slh-dsa-shake-128s"
3360
+ | "slh-dsa-shake-192f"
3361
+ | "slh-dsa-shake-192s"
3362
+ | "slh-dsa-shake-256f"
3363
+ | "slh-dsa-shake-256s",
3364
+ options: SLHDSAKeyPairOptions<"der", "der">,
3365
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
3366
+ ): void;
3367
+ function generateKeyPair(
3368
+ type:
3369
+ | "slh-dsa-sha2-128f"
3370
+ | "slh-dsa-sha2-128s"
3371
+ | "slh-dsa-sha2-192f"
3372
+ | "slh-dsa-sha2-192s"
3373
+ | "slh-dsa-sha2-256f"
3374
+ | "slh-dsa-sha2-256s"
3375
+ | "slh-dsa-shake-128f"
3376
+ | "slh-dsa-shake-128s"
3377
+ | "slh-dsa-shake-192f"
3378
+ | "slh-dsa-shake-192s"
3379
+ | "slh-dsa-shake-256f"
3380
+ | "slh-dsa-shake-256s",
3381
+ options: SLHDSAKeyPairKeyObjectOptions | undefined,
3382
+ callback: (err: Error | null, publicKey: KeyObject, privateKey: KeyObject) => void,
3383
+ ): void;
3175
3384
  namespace generateKeyPair {
3176
3385
  function __promisify__(
3177
3386
  type: "rsa",
@@ -3185,21 +3394,21 @@ declare module "crypto" {
3185
3394
  options: RSAKeyPairOptions<"pem", "der">,
3186
3395
  ): Promise<{
3187
3396
  publicKey: string;
3188
- privateKey: Buffer;
3397
+ privateKey: NonSharedBuffer;
3189
3398
  }>;
3190
3399
  function __promisify__(
3191
3400
  type: "rsa",
3192
3401
  options: RSAKeyPairOptions<"der", "pem">,
3193
3402
  ): Promise<{
3194
- publicKey: Buffer;
3403
+ publicKey: NonSharedBuffer;
3195
3404
  privateKey: string;
3196
3405
  }>;
3197
3406
  function __promisify__(
3198
3407
  type: "rsa",
3199
3408
  options: RSAKeyPairOptions<"der", "der">,
3200
3409
  ): Promise<{
3201
- publicKey: Buffer;
3202
- privateKey: Buffer;
3410
+ publicKey: NonSharedBuffer;
3411
+ privateKey: NonSharedBuffer;
3203
3412
  }>;
3204
3413
  function __promisify__(type: "rsa", options: RSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
3205
3414
  function __promisify__(
@@ -3214,21 +3423,21 @@ declare module "crypto" {
3214
3423
  options: RSAPSSKeyPairOptions<"pem", "der">,
3215
3424
  ): Promise<{
3216
3425
  publicKey: string;
3217
- privateKey: Buffer;
3426
+ privateKey: NonSharedBuffer;
3218
3427
  }>;
3219
3428
  function __promisify__(
3220
3429
  type: "rsa-pss",
3221
3430
  options: RSAPSSKeyPairOptions<"der", "pem">,
3222
3431
  ): Promise<{
3223
- publicKey: Buffer;
3432
+ publicKey: NonSharedBuffer;
3224
3433
  privateKey: string;
3225
3434
  }>;
3226
3435
  function __promisify__(
3227
3436
  type: "rsa-pss",
3228
3437
  options: RSAPSSKeyPairOptions<"der", "der">,
3229
3438
  ): Promise<{
3230
- publicKey: Buffer;
3231
- privateKey: Buffer;
3439
+ publicKey: NonSharedBuffer;
3440
+ privateKey: NonSharedBuffer;
3232
3441
  }>;
3233
3442
  function __promisify__(
3234
3443
  type: "rsa-pss",
@@ -3246,21 +3455,21 @@ declare module "crypto" {
3246
3455
  options: DSAKeyPairOptions<"pem", "der">,
3247
3456
  ): Promise<{
3248
3457
  publicKey: string;
3249
- privateKey: Buffer;
3458
+ privateKey: NonSharedBuffer;
3250
3459
  }>;
3251
3460
  function __promisify__(
3252
3461
  type: "dsa",
3253
3462
  options: DSAKeyPairOptions<"der", "pem">,
3254
3463
  ): Promise<{
3255
- publicKey: Buffer;
3464
+ publicKey: NonSharedBuffer;
3256
3465
  privateKey: string;
3257
3466
  }>;
3258
3467
  function __promisify__(
3259
3468
  type: "dsa",
3260
3469
  options: DSAKeyPairOptions<"der", "der">,
3261
3470
  ): Promise<{
3262
- publicKey: Buffer;
3263
- privateKey: Buffer;
3471
+ publicKey: NonSharedBuffer;
3472
+ privateKey: NonSharedBuffer;
3264
3473
  }>;
3265
3474
  function __promisify__(type: "dsa", options: DSAKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
3266
3475
  function __promisify__(
@@ -3275,21 +3484,21 @@ declare module "crypto" {
3275
3484
  options: ECKeyPairOptions<"pem", "der">,
3276
3485
  ): Promise<{
3277
3486
  publicKey: string;
3278
- privateKey: Buffer;
3487
+ privateKey: NonSharedBuffer;
3279
3488
  }>;
3280
3489
  function __promisify__(
3281
3490
  type: "ec",
3282
3491
  options: ECKeyPairOptions<"der", "pem">,
3283
3492
  ): Promise<{
3284
- publicKey: Buffer;
3493
+ publicKey: NonSharedBuffer;
3285
3494
  privateKey: string;
3286
3495
  }>;
3287
3496
  function __promisify__(
3288
3497
  type: "ec",
3289
3498
  options: ECKeyPairOptions<"der", "der">,
3290
3499
  ): Promise<{
3291
- publicKey: Buffer;
3292
- privateKey: Buffer;
3500
+ publicKey: NonSharedBuffer;
3501
+ privateKey: NonSharedBuffer;
3293
3502
  }>;
3294
3503
  function __promisify__(type: "ec", options: ECKeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
3295
3504
  function __promisify__(
@@ -3304,21 +3513,21 @@ declare module "crypto" {
3304
3513
  options: ED25519KeyPairOptions<"pem", "der">,
3305
3514
  ): Promise<{
3306
3515
  publicKey: string;
3307
- privateKey: Buffer;
3516
+ privateKey: NonSharedBuffer;
3308
3517
  }>;
3309
3518
  function __promisify__(
3310
3519
  type: "ed25519",
3311
3520
  options: ED25519KeyPairOptions<"der", "pem">,
3312
3521
  ): Promise<{
3313
- publicKey: Buffer;
3522
+ publicKey: NonSharedBuffer;
3314
3523
  privateKey: string;
3315
3524
  }>;
3316
3525
  function __promisify__(
3317
3526
  type: "ed25519",
3318
3527
  options: ED25519KeyPairOptions<"der", "der">,
3319
3528
  ): Promise<{
3320
- publicKey: Buffer;
3321
- privateKey: Buffer;
3529
+ publicKey: NonSharedBuffer;
3530
+ privateKey: NonSharedBuffer;
3322
3531
  }>;
3323
3532
  function __promisify__(
3324
3533
  type: "ed25519",
@@ -3336,21 +3545,21 @@ declare module "crypto" {
3336
3545
  options: ED448KeyPairOptions<"pem", "der">,
3337
3546
  ): Promise<{
3338
3547
  publicKey: string;
3339
- privateKey: Buffer;
3548
+ privateKey: NonSharedBuffer;
3340
3549
  }>;
3341
3550
  function __promisify__(
3342
3551
  type: "ed448",
3343
3552
  options: ED448KeyPairOptions<"der", "pem">,
3344
3553
  ): Promise<{
3345
- publicKey: Buffer;
3554
+ publicKey: NonSharedBuffer;
3346
3555
  privateKey: string;
3347
3556
  }>;
3348
3557
  function __promisify__(
3349
3558
  type: "ed448",
3350
3559
  options: ED448KeyPairOptions<"der", "der">,
3351
3560
  ): Promise<{
3352
- publicKey: Buffer;
3353
- privateKey: Buffer;
3561
+ publicKey: NonSharedBuffer;
3562
+ privateKey: NonSharedBuffer;
3354
3563
  }>;
3355
3564
  function __promisify__(type: "ed448", options?: ED448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
3356
3565
  function __promisify__(
@@ -3365,21 +3574,21 @@ declare module "crypto" {
3365
3574
  options: X25519KeyPairOptions<"pem", "der">,
3366
3575
  ): Promise<{
3367
3576
  publicKey: string;
3368
- privateKey: Buffer;
3577
+ privateKey: NonSharedBuffer;
3369
3578
  }>;
3370
3579
  function __promisify__(
3371
3580
  type: "x25519",
3372
3581
  options: X25519KeyPairOptions<"der", "pem">,
3373
3582
  ): Promise<{
3374
- publicKey: Buffer;
3583
+ publicKey: NonSharedBuffer;
3375
3584
  privateKey: string;
3376
3585
  }>;
3377
3586
  function __promisify__(
3378
3587
  type: "x25519",
3379
3588
  options: X25519KeyPairOptions<"der", "der">,
3380
3589
  ): Promise<{
3381
- publicKey: Buffer;
3382
- privateKey: Buffer;
3590
+ publicKey: NonSharedBuffer;
3591
+ privateKey: NonSharedBuffer;
3383
3592
  }>;
3384
3593
  function __promisify__(
3385
3594
  type: "x25519",
@@ -3397,21 +3606,21 @@ declare module "crypto" {
3397
3606
  options: X448KeyPairOptions<"pem", "der">,
3398
3607
  ): Promise<{
3399
3608
  publicKey: string;
3400
- privateKey: Buffer;
3609
+ privateKey: NonSharedBuffer;
3401
3610
  }>;
3402
3611
  function __promisify__(
3403
3612
  type: "x448",
3404
3613
  options: X448KeyPairOptions<"der", "pem">,
3405
3614
  ): Promise<{
3406
- publicKey: Buffer;
3615
+ publicKey: NonSharedBuffer;
3407
3616
  privateKey: string;
3408
3617
  }>;
3409
3618
  function __promisify__(
3410
3619
  type: "x448",
3411
3620
  options: X448KeyPairOptions<"der", "der">,
3412
3621
  ): Promise<{
3413
- publicKey: Buffer;
3414
- privateKey: Buffer;
3622
+ publicKey: NonSharedBuffer;
3623
+ privateKey: NonSharedBuffer;
3415
3624
  }>;
3416
3625
  function __promisify__(type: "x448", options?: X448KeyPairKeyObjectOptions): Promise<KeyPairKeyObjectResult>;
3417
3626
  function __promisify__(
@@ -3426,21 +3635,21 @@ declare module "crypto" {
3426
3635
  options: MLDSAKeyPairOptions<"pem", "der">,
3427
3636
  ): Promise<{
3428
3637
  publicKey: string;
3429
- privateKey: Buffer;
3638
+ privateKey: NonSharedBuffer;
3430
3639
  }>;
3431
3640
  function __promisify__(
3432
3641
  type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
3433
3642
  options: MLDSAKeyPairOptions<"der", "pem">,
3434
3643
  ): Promise<{
3435
- publicKey: Buffer;
3644
+ publicKey: NonSharedBuffer;
3436
3645
  privateKey: string;
3437
3646
  }>;
3438
3647
  function __promisify__(
3439
3648
  type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
3440
3649
  options: MLDSAKeyPairOptions<"der", "der">,
3441
3650
  ): Promise<{
3442
- publicKey: Buffer;
3443
- privateKey: Buffer;
3651
+ publicKey: NonSharedBuffer;
3652
+ privateKey: NonSharedBuffer;
3444
3653
  }>;
3445
3654
  function __promisify__(
3446
3655
  type: "ml-dsa-44" | "ml-dsa-65" | "ml-dsa-87",
@@ -3458,26 +3667,118 @@ declare module "crypto" {
3458
3667
  options: MLKEMKeyPairOptions<"pem", "der">,
3459
3668
  ): Promise<{
3460
3669
  publicKey: string;
3461
- privateKey: Buffer;
3670
+ privateKey: NonSharedBuffer;
3462
3671
  }>;
3463
3672
  function __promisify__(
3464
3673
  type: "ml-kem-1024" | "ml-kem-512" | "ml-kem-768",
3465
3674
  options: MLKEMKeyPairOptions<"der", "pem">,
3466
3675
  ): Promise<{
3467
- publicKey: Buffer;
3676
+ publicKey: NonSharedBuffer;
3468
3677
  privateKey: string;
3469
3678
  }>;
3470
3679
  function __promisify__(
3471
3680
  type: "ml-kem-1024" | "ml-kem-512" | "ml-kem-768",
3472
3681
  options: MLKEMKeyPairOptions<"der", "der">,
3473
3682
  ): Promise<{
3474
- publicKey: Buffer;
3475
- privateKey: Buffer;
3683
+ publicKey: NonSharedBuffer;
3684
+ privateKey: NonSharedBuffer;
3476
3685
  }>;
3477
3686
  function __promisify__(
3478
3687
  type: "ml-kem-1024" | "ml-kem-512" | "ml-kem-768",
3479
3688
  options?: MLKEMKeyPairKeyObjectOptions,
3480
3689
  ): Promise<KeyPairKeyObjectResult>;
3690
+ function __promisify__(
3691
+ type:
3692
+ | "slh-dsa-sha2-128f"
3693
+ | "slh-dsa-sha2-128s"
3694
+ | "slh-dsa-sha2-192f"
3695
+ | "slh-dsa-sha2-192s"
3696
+ | "slh-dsa-sha2-256f"
3697
+ | "slh-dsa-sha2-256s"
3698
+ | "slh-dsa-shake-128f"
3699
+ | "slh-dsa-shake-128s"
3700
+ | "slh-dsa-shake-192f"
3701
+ | "slh-dsa-shake-192s"
3702
+ | "slh-dsa-shake-256f"
3703
+ | "slh-dsa-shake-256s",
3704
+ options: SLHDSAKeyPairOptions<"pem", "pem">,
3705
+ ): Promise<{
3706
+ publicKey: string;
3707
+ privateKey: string;
3708
+ }>;
3709
+ function __promisify__(
3710
+ type:
3711
+ | "slh-dsa-sha2-128f"
3712
+ | "slh-dsa-sha2-128s"
3713
+ | "slh-dsa-sha2-192f"
3714
+ | "slh-dsa-sha2-192s"
3715
+ | "slh-dsa-sha2-256f"
3716
+ | "slh-dsa-sha2-256s"
3717
+ | "slh-dsa-shake-128f"
3718
+ | "slh-dsa-shake-128s"
3719
+ | "slh-dsa-shake-192f"
3720
+ | "slh-dsa-shake-192s"
3721
+ | "slh-dsa-shake-256f"
3722
+ | "slh-dsa-shake-256s",
3723
+ options: SLHDSAKeyPairOptions<"pem", "der">,
3724
+ ): Promise<{
3725
+ publicKey: string;
3726
+ privateKey: Buffer;
3727
+ }>;
3728
+ function __promisify__(
3729
+ type:
3730
+ | "slh-dsa-sha2-128f"
3731
+ | "slh-dsa-sha2-128s"
3732
+ | "slh-dsa-sha2-192f"
3733
+ | "slh-dsa-sha2-192s"
3734
+ | "slh-dsa-sha2-256f"
3735
+ | "slh-dsa-sha2-256s"
3736
+ | "slh-dsa-shake-128f"
3737
+ | "slh-dsa-shake-128s"
3738
+ | "slh-dsa-shake-192f"
3739
+ | "slh-dsa-shake-192s"
3740
+ | "slh-dsa-shake-256f"
3741
+ | "slh-dsa-shake-256s",
3742
+ options: SLHDSAKeyPairOptions<"der", "pem">,
3743
+ ): Promise<{
3744
+ publicKey: Buffer;
3745
+ privateKey: string;
3746
+ }>;
3747
+ function __promisify__(
3748
+ type:
3749
+ | "slh-dsa-sha2-128f"
3750
+ | "slh-dsa-sha2-128s"
3751
+ | "slh-dsa-sha2-192f"
3752
+ | "slh-dsa-sha2-192s"
3753
+ | "slh-dsa-sha2-256f"
3754
+ | "slh-dsa-sha2-256s"
3755
+ | "slh-dsa-shake-128f"
3756
+ | "slh-dsa-shake-128s"
3757
+ | "slh-dsa-shake-192f"
3758
+ | "slh-dsa-shake-192s"
3759
+ | "slh-dsa-shake-256f"
3760
+ | "slh-dsa-shake-256s",
3761
+ options: SLHDSAKeyPairOptions<"der", "der">,
3762
+ ): Promise<{
3763
+ publicKey: Buffer;
3764
+ privateKey: Buffer;
3765
+ }>;
3766
+ function __promisify__(
3767
+ type:
3768
+ | "slh-dsa-sha2-128f"
3769
+ | "slh-dsa-sha2-128s"
3770
+ | "slh-dsa-sha2-192f"
3771
+ | "slh-dsa-sha2-192s"
3772
+ | "slh-dsa-sha2-256f"
3773
+ | "slh-dsa-sha2-256s"
3774
+ | "slh-dsa-shake-128f"
3775
+ | "slh-dsa-shake-128s"
3776
+ | "slh-dsa-shake-192f"
3777
+ | "slh-dsa-shake-192s"
3778
+ | "slh-dsa-shake-256f"
3779
+ | "slh-dsa-shake-256s",
3780
+ options?: SLHDSAKeyPairKeyObjectOptions,
3781
+ ): Promise<KeyPairKeyObjectResult>;
3481
3782
  }
3482
3783
  /**
3483
3784
  * Calculates and returns the signature for `data` using the given private key and
@@ -3498,12 +3799,12 @@ declare module "crypto" {
3498
3799
  algorithm: string | null | undefined,
3499
3800
  data: NodeJS.ArrayBufferView,
3500
3801
  key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
3501
- ): Buffer;
3802
+ ): NonSharedBuffer;
3502
3803
  function sign(
3503
3804
  algorithm: string | null | undefined,
3504
3805
  data: NodeJS.ArrayBufferView,
3505
3806
  key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput | SignJsonWebKeyInput,
3506
- callback: (error: Error | null, data: Buffer) => void,
3807
+ callback: (error: Error | null, data: NonSharedBuffer) => void,
3507
3808
  ): void;
3508
3809
  /**
3509
3810
  * Verifies the given signature for `data` using the given key and algorithm. If
@@ -3560,11 +3861,11 @@ declare module "crypto" {
3560
3861
  function decapsulate(
3561
3862
  key: KeyLike | PrivateKeyInput | JsonWebKeyInput,
3562
3863
  ciphertext: ArrayBuffer | NodeJS.ArrayBufferView,
3563
- ): Buffer;
3864
+ ): NonSharedBuffer;
3564
3865
  function decapsulate(
3565
3866
  key: KeyLike | PrivateKeyInput | JsonWebKeyInput,
3566
3867
  ciphertext: ArrayBuffer | NodeJS.ArrayBufferView,
3567
- callback: (err: Error, sharedKey: Buffer) => void,
3868
+ callback: (err: Error, sharedKey: NonSharedBuffer) => void,
3568
3869
  ): void;
3569
3870
  /**
3570
3871
  * Computes the Diffie-Hellman shared secret based on a `privateKey` and a `publicKey`.
@@ -3574,10 +3875,10 @@ declare module "crypto" {
3574
3875
  * If the `callback` function is provided this function uses libuv's threadpool.
3575
3876
  * @since v13.9.0, v12.17.0
3576
3877
  */
3577
- function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): Buffer;
3878
+ function diffieHellman(options: { privateKey: KeyObject; publicKey: KeyObject }): NonSharedBuffer;
3578
3879
  function diffieHellman(
3579
3880
  options: { privateKey: KeyObject; publicKey: KeyObject },
3580
- callback: (err: Error | null, secret: Buffer) => void,
3881
+ callback: (err: Error | null, secret: NonSharedBuffer) => void,
3581
3882
  ): void;
3582
3883
  /**
3583
3884
  * Key encapsulation using a KEM algorithm with a public key.
@@ -3598,10 +3899,12 @@ declare module "crypto" {
3598
3899
  * If the `callback` function is provided this function uses libuv's threadpool.
3599
3900
  * @since v24.7.0
3600
3901
  */
3601
- function encapsulate(key: KeyLike | PublicKeyInput | JsonWebKeyInput): { sharedKey: Buffer; ciphertext: Buffer };
3602
3902
  function encapsulate(
3603
3903
  key: KeyLike | PublicKeyInput | JsonWebKeyInput,
3604
- callback: (err: Error, result: { sharedKey: Buffer; ciphertext: Buffer }) => void,
3904
+ ): { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer };
3905
+ function encapsulate(
3906
+ key: KeyLike | PublicKeyInput | JsonWebKeyInput,
3907
+ callback: (err: Error, result: { sharedKey: NonSharedBuffer; ciphertext: NonSharedBuffer }) => void,
3605
3908
  ): void;
3606
3909
  interface OneShotDigestOptions {
3607
3910
  /**
@@ -3666,12 +3969,12 @@ declare module "crypto" {
3666
3969
  algorithm: string,
3667
3970
  data: BinaryLike,
3668
3971
  options: OneShotDigestOptionsWithBufferEncoding | "buffer",
3669
- ): Buffer;
3972
+ ): NonSharedBuffer;
3670
3973
  function hash(
3671
3974
  algorithm: string,
3672
3975
  data: BinaryLike,
3673
3976
  options: OneShotDigestOptions | BinaryToTextEncoding | "buffer",
3674
- ): string | Buffer;
3977
+ ): string | NonSharedBuffer;
3675
3978
  type CipherMode = "cbc" | "ccm" | "cfb" | "ctr" | "ecb" | "gcm" | "ocb" | "ofb" | "stream" | "wrap" | "xts";
3676
3979
  interface CipherInfoOptions {
3677
3980
  /**
@@ -3963,7 +4266,7 @@ declare module "crypto" {
3963
4266
  * A `Buffer` containing the DER encoding of this certificate.
3964
4267
  * @since v15.6.0
3965
4268
  */
3966
- readonly raw: Buffer;
4269
+ readonly raw: NonSharedBuffer;
3967
4270
  /**
3968
4271
  * The serial number of this certificate.
3969
4272
  *
@@ -3973,6 +4276,16 @@ declare module "crypto" {
3973
4276
  * @since v15.6.0
3974
4277
  */
3975
4278
  readonly serialNumber: string;
4279
+ /**
4280
+ * The algorithm used to sign the certificate or `undefined` if the signature algorithm is unknown by OpenSSL.
4281
+ * @since v24.9.0
4282
+ */
4283
+ readonly signatureAlgorithm: string | undefined;
4284
+ /**
4285
+ * The OID of the algorithm used to sign the certificate.
4286
+ * @since v24.9.0
4287
+ */
4288
+ readonly signatureAlgorithmOid: string;
3976
4289
  /**
3977
4290
  * The date/time from which this certificate is considered valid.
3978
4291
  * @since v15.6.0
@@ -4331,7 +4644,7 @@ declare module "crypto" {
4331
4644
  function argon2(
4332
4645
  algorithm: Argon2Algorithm,
4333
4646
  parameters: Argon2Parameters,
4334
- callback: (err: Error | null, derivedKey: Buffer) => void,
4647
+ callback: (err: Error | null, derivedKey: NonSharedBuffer) => void,
4335
4648
  ): void;
4336
4649
  /**
4337
4650
  * Provides a synchronous [Argon2][] implementation. Argon2 is a password-based
@@ -4368,7 +4681,7 @@ declare module "crypto" {
4368
4681
  * @since v24.7.0
4369
4682
  * @experimental
4370
4683
  */
4371
- function argon2Sync(algorithm: Argon2Algorithm, parameters: Argon2Parameters): Buffer;
4684
+ function argon2Sync(algorithm: Argon2Algorithm, parameters: Argon2Parameters): NonSharedBuffer;
4372
4685
  /**
4373
4686
  * A convenient alias for `crypto.webcrypto.subtle`.
4374
4687
  * @since v17.4.0
@@ -4433,6 +4746,15 @@ declare module "crypto" {
4433
4746
  interface Algorithm {
4434
4747
  name: string;
4435
4748
  }
4749
+ interface Argon2Params extends Algorithm {
4750
+ associatedData?: BufferSource;
4751
+ memory: number;
4752
+ nonce: BufferSource;
4753
+ parallelism: number;
4754
+ passes: number;
4755
+ secretValue?: BufferSource;
4756
+ version?: number;
4757
+ }
4436
4758
  interface CShakeParams extends Algorithm {
4437
4759
  customization?: BufferSource;
4438
4760
  functionName?: BufferSource;
@@ -4456,9 +4778,6 @@ declare module "crypto" {
4456
4778
  interface EcdsaParams extends Algorithm {
4457
4779
  hash: HashAlgorithmIdentifier;
4458
4780
  }
4459
- interface Ed448Params extends Algorithm {
4460
- context?: BufferSource;
4461
- }
4462
4781
  interface HkdfParams extends Algorithm {
4463
4782
  hash: HashAlgorithmIdentifier;
4464
4783
  info: BufferSource;
@@ -4499,6 +4818,19 @@ declare module "crypto" {
4499
4818
  interface KeyAlgorithm {
4500
4819
  name: string;
4501
4820
  }
4821
+ interface KmacImportParams extends Algorithm {
4822
+ length?: number;
4823
+ }
4824
+ interface KmacKeyAlgorithm extends KeyAlgorithm {
4825
+ length: number;
4826
+ }
4827
+ interface KmacKeyGenParams extends Algorithm {
4828
+ length?: number;
4829
+ }
4830
+ interface KmacParams extends Algorithm {
4831
+ customization?: BufferSource;
4832
+ length: number;
4833
+ }
4502
4834
  interface Pbkdf2Params extends Algorithm {
4503
4835
  hash: HashAlgorithmIdentifier;
4504
4836
  iterations: number;
@@ -4628,6 +4960,10 @@ declare module "crypto" {
4628
4960
  */
4629
4961
  interface SubtleCrypto {
4630
4962
  /**
4963
+ * A message recipient uses their asymmetric private key to decrypt an
4964
+ * "encapsulated key" (ciphertext), thereby recovering a temporary symmetric
4965
+ * key (represented as `ArrayBuffer`) which is then used to decrypt a message.
4966
+ *
4631
4967
  * The algorithms currently supported include:
4632
4968
  *
4633
4969
  * * `'ML-KEM-512'`
@@ -4642,6 +4978,10 @@ declare module "crypto" {
4642
4978
  ciphertext: BufferSource,
4643
4979
  ): Promise<ArrayBuffer>;
4644
4980
  /**
4981
+ * A message recipient uses their asymmetric private key to decrypt an
4982
+ * "encapsulated key" (ciphertext), thereby recovering a temporary symmetric
4983
+ * key (represented as `CryptoKey`) which is then used to decrypt a message.
4984
+ *
4645
4985
  * The algorithms currently supported include:
4646
4986
  *
4647
4987
  * * `'ML-KEM-512'`
@@ -4655,13 +4995,13 @@ declare module "crypto" {
4655
4995
  decapsulationAlgorithm: AlgorithmIdentifier,
4656
4996
  decapsulationKey: CryptoKey,
4657
4997
  ciphertext: BufferSource,
4658
- sharedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | AesDerivedKeyParams,
4998
+ sharedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | AesDerivedKeyParams | KmacImportParams,
4659
4999
  extractable: boolean,
4660
5000
  usages: KeyUsage[],
4661
5001
  ): Promise<CryptoKey>;
4662
5002
  /**
4663
5003
  * Using the method and parameters specified in `algorithm` and the keying material provided by `key`,
4664
- * `subtle.decrypt()` attempts to decipher the provided `data`. If successful,
5004
+ * this method attempts to decipher the provided `data`. If successful,
4665
5005
  * the returned promise will be resolved with an `<ArrayBuffer>` containing the plaintext result.
4666
5006
  *
4667
5007
  * The algorithms currently supported include:
@@ -4681,7 +5021,7 @@ declare module "crypto" {
4681
5021
  ): Promise<ArrayBuffer>;
4682
5022
  /**
4683
5023
  * Using the method and parameters specified in `algorithm` and the keying material provided by `baseKey`,
4684
- * `subtle.deriveBits()` attempts to generate `length` bits.
5024
+ * this method attempts to generate `length` bits.
4685
5025
  * The Node.js implementation requires that when `length` is a number it must be multiple of `8`.
4686
5026
  * When `length` is `null` the maximum number of bits for a given algorithm is generated. This is allowed
4687
5027
  * for the `'ECDH'`, `'X25519'`, and `'X448'` algorithms.
@@ -4689,6 +5029,9 @@ declare module "crypto" {
4689
5029
  *
4690
5030
  * The algorithms currently supported include:
4691
5031
  *
5032
+ * * `'Argon2d'`
5033
+ * * `'Argon2i'`
5034
+ * * `'Argon2id'`
4692
5035
  * * `'ECDH'`
4693
5036
  * * `'HKDF'`
4694
5037
  * * `'PBKDF2'`
@@ -4702,19 +5045,22 @@ declare module "crypto" {
4702
5045
  length?: number | null,
4703
5046
  ): Promise<ArrayBuffer>;
4704
5047
  deriveBits(
4705
- algorithm: EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params,
5048
+ algorithm: EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params,
4706
5049
  baseKey: CryptoKey,
4707
5050
  length: number,
4708
5051
  ): Promise<ArrayBuffer>;
4709
5052
  /**
4710
5053
  * Using the method and parameters specified in `algorithm`, and the keying material provided by `baseKey`,
4711
- * `subtle.deriveKey()` attempts to generate a new <CryptoKey>` based on the method and parameters in `derivedKeyAlgorithm`.
5054
+ * this method attempts to generate a new <CryptoKey>` based on the method and parameters in `derivedKeyAlgorithm`.
4712
5055
  *
4713
5056
  * Calling `subtle.deriveKey()` is equivalent to calling `subtle.deriveBits()` to generate raw keying material,
4714
5057
  * then passing the result into the `subtle.importKey()` method using the `deriveKeyAlgorithm`, `extractable`, and `keyUsages` parameters as input.
4715
5058
  *
4716
5059
  * The algorithms currently supported include:
4717
5060
  *
5061
+ * * `'Argon2d'`
5062
+ * * `'Argon2i'`
5063
+ * * `'Argon2id'`
4718
5064
  * * `'ECDH'`
4719
5065
  * * `'HKDF'`
4720
5066
  * * `'PBKDF2'`
@@ -4724,9 +5070,9 @@ declare module "crypto" {
4724
5070
  * @since v15.0.0
4725
5071
  */
4726
5072
  deriveKey(
4727
- algorithm: EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params,
5073
+ algorithm: EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params | Argon2Params,
4728
5074
  baseKey: CryptoKey,
4729
- derivedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | AesDerivedKeyParams,
5075
+ derivedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | AesDerivedKeyParams | KmacImportParams,
4730
5076
  extractable: boolean,
4731
5077
  keyUsages: readonly KeyUsage[],
4732
5078
  ): Promise<CryptoKey>;
@@ -4751,6 +5097,9 @@ declare module "crypto" {
4751
5097
  */
4752
5098
  digest(algorithm: AlgorithmIdentifier | CShakeParams, data: BufferSource): Promise<ArrayBuffer>;
4753
5099
  /**
5100
+ * Uses a message recipient's asymmetric public key to encrypt a temporary symmetric key.
5101
+ * This encrypted key is the "encapsulated key" represented as `EncapsulatedBits`.
5102
+ *
4754
5103
  * The algorithms currently supported include:
4755
5104
  *
4756
5105
  * * `'ML-KEM-512'`
@@ -4764,6 +5113,9 @@ declare module "crypto" {
4764
5113
  encapsulationKey: CryptoKey,
4765
5114
  ): Promise<EncapsulatedBits>;
4766
5115
  /**
5116
+ * Uses a message recipient's asymmetric public key to encrypt a temporary symmetric key.
5117
+ * This encrypted key is the "encapsulated key" represented as `EncapsulatedKey`.
5118
+ *
4767
5119
  * The algorithms currently supported include:
4768
5120
  *
4769
5121
  * * `'ML-KEM-512'`
@@ -4776,13 +5128,13 @@ declare module "crypto" {
4776
5128
  encapsulateKey(
4777
5129
  encapsulationAlgorithm: AlgorithmIdentifier,
4778
5130
  encapsulationKey: CryptoKey,
4779
- sharedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | AesDerivedKeyParams,
5131
+ sharedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | AesDerivedKeyParams | KmacImportParams,
4780
5132
  extractable: boolean,
4781
5133
  usages: KeyUsage[],
4782
5134
  ): Promise<EncapsulatedKey>;
4783
5135
  /**
4784
5136
  * Using the method and parameters specified by `algorithm` and the keying material provided by `key`,
4785
- * `subtle.encrypt()` attempts to encipher `data`. If successful,
5137
+ * this method attempts to encipher `data`. If successful,
4786
5138
  * the returned promise is resolved with an `<ArrayBuffer>` containing the encrypted result.
4787
5139
  *
4788
5140
  * The algorithms currently supported include:
@@ -4818,9 +5170,9 @@ declare module "crypto" {
4818
5170
  exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
4819
5171
  exportKey(format: Exclude<KeyFormat, "jwk">, key: CryptoKey): Promise<ArrayBuffer>;
4820
5172
  /**
4821
- * Using the method and parameters provided in `algorithm`, `subtle.generateKey()`
4822
- * attempts to generate new keying material. Depending the method used, the method
4823
- * may generate either a single `CryptoKey` or a `CryptoKeyPair`.
5173
+ * Using the parameters provided in `algorithm`, this method
5174
+ * attempts to generate new keying material. Depending on the algorithm used
5175
+ * either a single `CryptoKey` or a `CryptoKeyPair` is generated.
4824
5176
  *
4825
5177
  * The `CryptoKeyPair` (public and private key) generating algorithms supported
4826
5178
  * include:
@@ -4841,7 +5193,7 @@ declare module "crypto" {
4841
5193
  * * `'X25519'`
4842
5194
  * * `'X448'`
4843
5195
  *
4844
- * The {CryptoKey} (secret key) generating algorithms supported include:
5196
+ * The `CryptoKey` (secret key) generating algorithms supported include:
4845
5197
  * * `'AES-CBC'`
4846
5198
  * * `'AES-CTR'`
4847
5199
  * * `'AES-GCM'`
@@ -4849,6 +5201,8 @@ declare module "crypto" {
4849
5201
  * * `'AES-OCB'`
4850
5202
  * * `'ChaCha20-Poly1305'`
4851
5203
  * * `'HMAC'`
5204
+ * * `'KMAC128'`
5205
+ * * `'KMAC256'`
4852
5206
  * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
4853
5207
  * @since v15.0.0
4854
5208
  */
@@ -4858,7 +5212,7 @@ declare module "crypto" {
4858
5212
  keyUsages: readonly KeyUsage[],
4859
5213
  ): Promise<CryptoKeyPair>;
4860
5214
  generateKey(
4861
- algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params,
5215
+ algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params | KmacKeyGenParams,
4862
5216
  extractable: boolean,
4863
5217
  keyUsages: readonly KeyUsage[],
4864
5218
  ): Promise<CryptoKey>;
@@ -4876,11 +5230,13 @@ declare module "crypto" {
4876
5230
  */
4877
5231
  getPublicKey(key: CryptoKey, keyUsages: KeyUsage[]): Promise<CryptoKey>;
4878
5232
  /**
4879
- * The `subtle.importKey()` method attempts to interpret the provided `keyData` as the given `format`
4880
- * to create a `<CryptoKey>` instance using the provided `algorithm`, `extractable`, and `keyUsages` arguments.
4881
- * If the import is successful, the returned promise will be resolved with the created `<CryptoKey>`.
5233
+ * This method attempts to interpret the provided `keyData`
5234
+ * as the given `format` to create a `CryptoKey` instance using the provided
5235
+ * `algorithm`, `extractable`, and `keyUsages` arguments. If the import is
5236
+ * successful, the returned promise will be resolved with a {CryptoKey}
5237
+ * representation of the key material.
4882
5238
  *
4883
- * If importing a `'PBKDF2'` key, `extractable` must be `false`.
5239
+ * If importing KDF algorithm keys, `extractable` must be `false`.
4884
5240
  * @param format Must be one of `'raw'`, `'pkcs8'`, `'spki'`, `'jwk'`, `'raw-secret'`,
4885
5241
  * `'raw-public'`, or `'raw-seed'`.
4886
5242
  * @param keyUsages See {@link https://nodejs.org/docs/latest/api/webcrypto.html#cryptokeyusages Key usages}.
@@ -4894,7 +5250,8 @@ declare module "crypto" {
4894
5250
  | RsaHashedImportParams
4895
5251
  | EcKeyImportParams
4896
5252
  | HmacImportParams
4897
- | AesKeyAlgorithm,
5253
+ | AesKeyAlgorithm
5254
+ | KmacImportParams,
4898
5255
  extractable: boolean,
4899
5256
  keyUsages: readonly KeyUsage[],
4900
5257
  ): Promise<CryptoKey>;
@@ -4906,13 +5263,14 @@ declare module "crypto" {
4906
5263
  | RsaHashedImportParams
4907
5264
  | EcKeyImportParams
4908
5265
  | HmacImportParams
4909
- | AesKeyAlgorithm,
5266
+ | AesKeyAlgorithm
5267
+ | KmacImportParams,
4910
5268
  extractable: boolean,
4911
5269
  keyUsages: KeyUsage[],
4912
5270
  ): Promise<CryptoKey>;
4913
5271
  /**
4914
5272
  * Using the method and parameters given by `algorithm` and the keying material provided by `key`,
4915
- * `subtle.sign()` attempts to generate a cryptographic signature of `data`. If successful,
5273
+ * this method attempts to generate a cryptographic signature of `data`. If successful,
4916
5274
  * the returned promise is resolved with an `<ArrayBuffer>` containing the generated signature.
4917
5275
  *
4918
5276
  * The algorithms currently supported include:
@@ -4921,6 +5279,8 @@ declare module "crypto" {
4921
5279
  * * `'Ed25519'`
4922
5280
  * * `'Ed448'`
4923
5281
  * * `'HMAC'`
5282
+ * * `'KMAC128'`
5283
+ * * `'KMAC256'`
4924
5284
  * * `'ML-DSA-44'`
4925
5285
  * * `'ML-DSA-65'`
4926
5286
  * * `'ML-DSA-87'`
@@ -4929,13 +5289,13 @@ declare module "crypto" {
4929
5289
  * @since v15.0.0
4930
5290
  */
4931
5291
  sign(
4932
- algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params | ContextParams,
5292
+ algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | ContextParams | KmacParams,
4933
5293
  key: CryptoKey,
4934
5294
  data: BufferSource,
4935
5295
  ): Promise<ArrayBuffer>;
4936
5296
  /**
4937
5297
  * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
4938
- * The `subtle.unwrapKey()` method attempts to decrypt a wrapped key and create a `<CryptoKey>` instance.
5298
+ * This method attempts to decrypt a wrapped key and create a `<CryptoKey>` instance.
4939
5299
  * It is equivalent to calling `subtle.decrypt()` first on the encrypted key data (using the `wrappedKey`, `unwrapAlgo`, and `unwrappingKey` arguments as input)
4940
5300
  * then passing the results in to the `subtle.importKey()` method using the `unwrappedKeyAlgo`, `extractable`, and `keyUsages` arguments as inputs.
4941
5301
  * If successful, the returned promise is resolved with a `<CryptoKey>` object.
@@ -4963,6 +5323,8 @@ declare module "crypto" {
4963
5323
  * * `'Ed25519'`
4964
5324
  * * `'Ed448'`
4965
5325
  * * `'HMAC'`
5326
+ * * `'KMAC128'`
5327
+ * * `'KMAC256'`
4966
5328
  * * `'ML-DSA-44'`
4967
5329
  * * `'ML-DSA-65'`
4968
5330
  * * `'ML-DSA-87'`
@@ -4989,21 +5351,24 @@ declare module "crypto" {
4989
5351
  | RsaHashedImportParams
4990
5352
  | EcKeyImportParams
4991
5353
  | HmacImportParams
4992
- | AesKeyAlgorithm,
5354
+ | AesKeyAlgorithm
5355
+ | KmacImportParams,
4993
5356
  extractable: boolean,
4994
5357
  keyUsages: KeyUsage[],
4995
5358
  ): Promise<CryptoKey>;
4996
5359
  /**
4997
5360
  * Using the method and parameters given in `algorithm` and the keying material provided by `key`,
4998
- * `subtle.verify()` attempts to verify that `signature` is a valid cryptographic signature of `data`.
5361
+ * This method attempts to verify that `signature` is a valid cryptographic signature of `data`.
4999
5362
  * The returned promise is resolved with either `true` or `false`.
5000
5363
  *
5001
5364
  * The algorithms currently supported include:
5002
5365
  *
5003
5366
  * * `'ECDSA'`
5004
5367
  * * `'Ed25519'`
5005
- * * `'Ed448'`[^secure-curves]
5368
+ * * `'Ed448'`
5006
5369
  * * `'HMAC'`
5370
+ * * `'KMAC128'`
5371
+ * * `'KMAC256'`
5007
5372
  * * `'ML-DSA-44'`
5008
5373
  * * `'ML-DSA-65'`
5009
5374
  * * `'ML-DSA-87'`
@@ -5012,14 +5377,14 @@ declare module "crypto" {
5012
5377
  * @since v15.0.0
5013
5378
  */
5014
5379
  verify(
5015
- algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | Ed448Params | ContextParams,
5380
+ algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams | ContextParams | KmacParams,
5016
5381
  key: CryptoKey,
5017
5382
  signature: BufferSource,
5018
5383
  data: BufferSource,
5019
5384
  ): Promise<boolean>;
5020
5385
  /**
5021
5386
  * In cryptography, "wrapping a key" refers to exporting and then encrypting the keying material.
5022
- * The `subtle.wrapKey()` method exports the keying material into the format identified by `format`,
5387
+ * This method exports the keying material into the format identified by `format`,
5023
5388
  * then encrypts it using the method and parameters specified by `wrapAlgo` and the keying material provided by `wrappingKey`.
5024
5389
  * It is the equivalent to calling `subtle.exportKey()` using `format` and `key` as the arguments,
5025
5390
  * then passing the result to the `subtle.encrypt()` method using `wrappingKey` and `wrapAlgo` as inputs.