@types/node 18.19.78 → 18.19.79

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.
node v18.19/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v18.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 28 Feb 2025 22:02:14 GMT
11
+ * Last updated: Mon, 03 Mar 2025 18:02:26 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
node v18.19/crypto.d.ts CHANGED
@@ -669,9 +669,10 @@ declare module "crypto" {
669
669
  */
670
670
  type: KeyObjectType;
671
671
  }
672
- type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm" | "chacha20-poly1305";
672
+ type CipherCCMTypes = "aes-128-ccm" | "aes-192-ccm" | "aes-256-ccm";
673
673
  type CipherGCMTypes = "aes-128-gcm" | "aes-192-gcm" | "aes-256-gcm";
674
674
  type CipherOCBTypes = "aes-128-ocb" | "aes-192-ocb" | "aes-256-ocb";
675
+ type CipherChaCha20Poly1305Types = "chacha20-poly1305";
675
676
  type BinaryLike = string | NodeJS.ArrayBufferView;
676
677
  type CipherKey = BinaryLike | KeyObject;
677
678
  interface CipherCCMOptions extends stream.TransformOptions {
@@ -683,6 +684,10 @@ declare module "crypto" {
683
684
  interface CipherOCBOptions extends stream.TransformOptions {
684
685
  authTagLength: number;
685
686
  }
687
+ interface CipherChaCha20Poly1305Options extends stream.TransformOptions {
688
+ /** @default 16 */
689
+ authTagLength?: number | undefined;
690
+ }
686
691
  /**
687
692
  * Creates and returns a `Cipher` object that uses the given `algorithm` and `password`.
688
693
  *
@@ -720,6 +725,14 @@ declare module "crypto" {
720
725
  /** @deprecated since v10.0.0 use `createCipheriv()` */
721
726
  function createCipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): CipherGCM;
722
727
  /** @deprecated since v10.0.0 use `createCipheriv()` */
728
+ function createCipher(algorithm: CipherOCBTypes, password: BinaryLike, options: CipherOCBOptions): CipherOCB;
729
+ /** @deprecated since v10.0.0 use `createCipheriv()` */
730
+ function createCipher(
731
+ algorithm: CipherChaCha20Poly1305Types,
732
+ password: BinaryLike,
733
+ options?: CipherChaCha20Poly1305Options,
734
+ ): CipherChaCha20Poly1305;
735
+ /** @deprecated since v10.0.0 use `createCipheriv()` */
723
736
  function createCipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Cipher;
724
737
  /**
725
738
  * Creates and returns a `Cipher` object, with the given `algorithm`, `key` and
@@ -769,6 +782,12 @@ declare module "crypto" {
769
782
  iv: BinaryLike,
770
783
  options?: CipherGCMOptions,
771
784
  ): CipherGCM;
785
+ function createCipheriv(
786
+ algorithm: CipherChaCha20Poly1305Types,
787
+ key: CipherKey,
788
+ iv: BinaryLike,
789
+ options?: CipherChaCha20Poly1305Options,
790
+ ): CipherChaCha20Poly1305;
772
791
  function createCipheriv(
773
792
  algorithm: string,
774
793
  key: CipherKey,
@@ -968,6 +987,15 @@ declare module "crypto" {
968
987
  ): this;
969
988
  getAuthTag(): Buffer;
970
989
  }
990
+ interface CipherChaCha20Poly1305 extends Cipher {
991
+ setAAD(
992
+ buffer: NodeJS.ArrayBufferView,
993
+ options: {
994
+ plaintextLength: number;
995
+ },
996
+ ): this;
997
+ getAuthTag(): Buffer;
998
+ }
971
999
  /**
972
1000
  * Creates and returns a `Decipher` object that uses the given `algorithm` and `password` (key).
973
1001
  *
@@ -994,6 +1022,14 @@ declare module "crypto" {
994
1022
  /** @deprecated since v10.0.0 use `createDecipheriv()` */
995
1023
  function createDecipher(algorithm: CipherGCMTypes, password: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
996
1024
  /** @deprecated since v10.0.0 use `createDecipheriv()` */
1025
+ function createDecipher(algorithm: CipherOCBTypes, password: BinaryLike, options: CipherOCBOptions): DecipherOCB;
1026
+ /** @deprecated since v10.0.0 use `createDecipheriv()` */
1027
+ function createDecipher(
1028
+ algorithm: CipherChaCha20Poly1305Types,
1029
+ password: BinaryLike,
1030
+ options?: CipherChaCha20Poly1305Options,
1031
+ ): DecipherChaCha20Poly1305;
1032
+ /** @deprecated since v10.0.0 use `createDecipheriv()` */
997
1033
  function createDecipher(algorithm: string, password: BinaryLike, options?: stream.TransformOptions): Decipher;
998
1034
  /**
999
1035
  * Creates and returns a `Decipher` object that uses the given `algorithm`, `key` and initialization vector (`iv`).
@@ -1042,6 +1078,12 @@ declare module "crypto" {
1042
1078
  iv: BinaryLike,
1043
1079
  options?: CipherGCMOptions,
1044
1080
  ): DecipherGCM;
1081
+ function createDecipheriv(
1082
+ algorithm: CipherChaCha20Poly1305Types,
1083
+ key: CipherKey,
1084
+ iv: BinaryLike,
1085
+ options?: CipherChaCha20Poly1305Options,
1086
+ ): DecipherChaCha20Poly1305;
1045
1087
  function createDecipheriv(
1046
1088
  algorithm: string,
1047
1089
  key: CipherKey,
@@ -1226,6 +1268,15 @@ declare module "crypto" {
1226
1268
  },
1227
1269
  ): this;
1228
1270
  }
1271
+ interface DecipherChaCha20Poly1305 extends Decipher {
1272
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
1273
+ setAAD(
1274
+ buffer: NodeJS.ArrayBufferView,
1275
+ options: {
1276
+ plaintextLength: number;
1277
+ },
1278
+ ): this;
1279
+ }
1229
1280
  interface PrivateKeyInput {
1230
1281
  key: string | Buffer;
1231
1282
  format?: KeyFormat | undefined;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "18.19.78",
3
+ "version": "18.19.79",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -220,6 +220,6 @@
220
220
  "undici-types": "~5.26.4"
221
221
  },
222
222
  "peerDependencies": {},
223
- "typesPublisherContentHash": "53c96e56ee2759566e81a31cb23f4874fe03fa92030604a19231d864af73dbcf",
223
+ "typesPublisherContentHash": "4413da7f29f5e0b4c3cacc7710d6e31782ca3471ece6f3716fb0904e092fb4d3",
224
224
  "typeScriptVersion": "5.0"
225
225
  }