@types/node 17.0.25 → 17.0.26

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 (3) hide show
  1. node/README.md +1 -1
  2. node/crypto.d.ts +28 -4
  3. node/package.json +2 -2
node/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 18 Apr 2022 16:31:18 GMT
11
+ * Last updated: Sun, 24 Apr 2022 21:01:37 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `AbortController`, `AbortSignal`, `__dirname`, `__filename`, `console`, `exports`, `gc`, `global`, `module`, `process`, `require`
14
14
 
node/crypto.d.ts CHANGED
@@ -646,6 +646,7 @@ declare module 'crypto' {
646
646
  }
647
647
  type CipherCCMTypes = 'aes-128-ccm' | 'aes-192-ccm' | 'aes-256-ccm' | 'chacha20-poly1305';
648
648
  type CipherGCMTypes = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
649
+ type CipherOCBTypes = 'aes-128-ocb' | 'aes-192-ocb' | 'aes-256-ocb';
649
650
  type BinaryLike = string | NodeJS.ArrayBufferView;
650
651
  type CipherKey = BinaryLike | KeyObject;
651
652
  interface CipherCCMOptions extends stream.TransformOptions {
@@ -654,6 +655,9 @@ declare module 'crypto' {
654
655
  interface CipherGCMOptions extends stream.TransformOptions {
655
656
  authTagLength?: number | undefined;
656
657
  }
658
+ interface CipherOCBOptions extends stream.TransformOptions {
659
+ authTagLength: number;
660
+ }
657
661
  /**
658
662
  * Creates and returns a `Cipher` object that uses the given `algorithm` and`password`.
659
663
  *
@@ -720,8 +724,9 @@ declare module 'crypto' {
720
724
  * @since v0.1.94
721
725
  * @param options `stream.transform` options
722
726
  */
723
- function createCipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike | null, options: CipherCCMOptions): CipherCCM;
724
- function createCipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike | null, options?: CipherGCMOptions): CipherGCM;
727
+ function createCipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): CipherCCM;
728
+ function createCipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): CipherOCB;
729
+ function createCipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): CipherGCM;
725
730
  function createCipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Cipher;
726
731
  /**
727
732
  * Instances of the `Cipher` class are used to encrypt data. The class can be
@@ -907,6 +912,15 @@ declare module 'crypto' {
907
912
  ): this;
908
913
  getAuthTag(): Buffer;
909
914
  }
915
+ interface CipherOCB extends Cipher {
916
+ setAAD(
917
+ buffer: NodeJS.ArrayBufferView,
918
+ options?: {
919
+ plaintextLength: number;
920
+ }
921
+ ): this;
922
+ getAuthTag(): Buffer;
923
+ }
910
924
  /**
911
925
  * Creates and returns a `Decipher` object that uses the given `algorithm` and`password` (key).
912
926
  *
@@ -961,8 +975,9 @@ declare module 'crypto' {
961
975
  * @since v0.1.94
962
976
  * @param options `stream.transform` options
963
977
  */
964
- function createDecipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike | null, options: CipherCCMOptions): DecipherCCM;
965
- function createDecipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike | null, options?: CipherGCMOptions): DecipherGCM;
978
+ function createDecipheriv(algorithm: CipherCCMTypes, key: CipherKey, iv: BinaryLike, options: CipherCCMOptions): DecipherCCM;
979
+ function createDecipheriv(algorithm: CipherOCBTypes, key: CipherKey, iv: BinaryLike, options: CipherOCBOptions): DecipherOCB;
980
+ function createDecipheriv(algorithm: CipherGCMTypes, key: CipherKey, iv: BinaryLike, options?: CipherGCMOptions): DecipherGCM;
966
981
  function createDecipheriv(algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
967
982
  /**
968
983
  * Instances of the `Decipher` class are used to decrypt data. The class can be
@@ -1133,6 +1148,15 @@ declare module 'crypto' {
1133
1148
  }
1134
1149
  ): this;
1135
1150
  }
1151
+ interface DecipherOCB extends Decipher {
1152
+ setAuthTag(buffer: NodeJS.ArrayBufferView): this;
1153
+ setAAD(
1154
+ buffer: NodeJS.ArrayBufferView,
1155
+ options?: {
1156
+ plaintextLength: number;
1157
+ }
1158
+ ): this;
1159
+ }
1136
1160
  interface PrivateKeyInput {
1137
1161
  key: string | Buffer;
1138
1162
  format?: KeyFormat | undefined;
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "17.0.25",
3
+ "version": "17.0.26",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -215,6 +215,6 @@
215
215
  },
216
216
  "scripts": {},
217
217
  "dependencies": {},
218
- "typesPublisherContentHash": "825e787f0a7c6fde372f102a7e96d0c64b5cb4ff7c07557941bedf371f097b76",
218
+ "typesPublisherContentHash": "532e2a9be1446f8b4aff478a81907e04d5c3f722dd7b24bdffa7da895c7f5a1c",
219
219
  "typeScriptVersion": "3.9"
220
220
  }