@types/node 11.11.7 → 11.11.8

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 +20 -9
  3. node/package.json +2 -2
node/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for Node.js ( http://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, 25 Mar 2019 20:44:50 GMT
11
+ * Last updated: Tue, 26 Mar 2019 16:09:25 GMT
12
12
  * Dependencies: none
13
13
  * Global values: Buffer, NodeJS, Symbol, __dirname, __filename, clearImmediate, clearInterval, clearTimeout, console, exports, global, module, process, queueMicrotask, require, setImmediate, setInterval, setTimeout
14
14
 
node/crypto.d.ts CHANGED
@@ -118,13 +118,15 @@ declare module "crypto" {
118
118
  type HexBase64BinaryEncoding = "binary" | "base64" | "hex";
119
119
  type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";
120
120
 
121
- interface Hash extends NodeJS.ReadWriteStream {
121
+ class Hash extends stream.Duplex {
122
+ private constructor();
122
123
  update(data: BinaryLike): Hash;
123
124
  update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hash;
124
125
  digest(): Buffer;
125
126
  digest(encoding: HexBase64Latin1Encoding): string;
126
127
  }
127
- interface Hmac extends NodeJS.ReadWriteStream {
128
+ class Hmac extends stream.Duplex {
129
+ private constructor();
128
130
  update(data: BinaryLike): Hmac;
129
131
  update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Hmac;
130
132
  digest(): Buffer;
@@ -133,7 +135,8 @@ declare module "crypto" {
133
135
 
134
136
  export type KeyObjectType = 'secret' | 'public' | 'private';
135
137
 
136
- interface KeyObject {
138
+ class KeyObject {
139
+ private constructor();
137
140
  asymmetricKeyType?: KeyType;
138
141
  export(options?: {
139
142
  type: 'pkcs1' | 'spki' | 'pkcs8' | 'sec1',
@@ -182,7 +185,8 @@ declare module "crypto" {
182
185
  algorithm: string, key: CipherKey, iv: BinaryLike | null, options?: stream.TransformOptions
183
186
  ): Cipher;
184
187
 
185
- interface Cipher extends NodeJS.ReadWriteStream {
188
+ class Cipher extends stream.Duplex {
189
+ private constructor();
186
190
  update(data: BinaryLike): Buffer;
187
191
  update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer;
188
192
  update(data: Binary, input_encoding: undefined, output_encoding: HexBase64BinaryEncoding): string;
@@ -222,7 +226,8 @@ declare module "crypto" {
222
226
  ): DecipherGCM;
223
227
  function createDecipheriv(algorithm: string, key: BinaryLike, iv: BinaryLike | null, options?: stream.TransformOptions): Decipher;
224
228
 
225
- interface Decipher extends NodeJS.ReadWriteStream {
229
+ class Decipher extends stream.Duplex {
230
+ private constructor();
226
231
  update(data: Binary): Buffer;
227
232
  update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer;
228
233
  update(data: Binary, input_encoding: undefined, output_encoding: Utf8AsciiBinaryEncoding): string;
@@ -268,7 +273,9 @@ declare module "crypto" {
268
273
 
269
274
  type KeyLike = string | Buffer | KeyObject;
270
275
 
271
- interface Signer extends NodeJS.WritableStream {
276
+ class Signer extends stream.Writable {
277
+ private constructor();
278
+
272
279
  update(data: BinaryLike): Signer;
273
280
  update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer;
274
281
  sign(private_key: SignPrivateKeyInput | KeyLike): Buffer;
@@ -276,11 +283,13 @@ declare module "crypto" {
276
283
  }
277
284
 
278
285
  function createVerify(algorith: string, options?: stream.WritableOptions): Verify;
279
- interface Verify extends NodeJS.WritableStream {
286
+ class Verify extends stream.Writable {
287
+ private constructor();
288
+
280
289
  update(data: BinaryLike): Verify;
281
290
  update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Verify;
282
291
  verify(object: Object | KeyLike, signature: Binary): boolean;
283
- verify(object: Object | KeyLike, signature: string, signature_format: HexBase64Latin1Encoding): boolean;
292
+ verify(object: Object | KeyLike, signature: string, signature_format?: HexBase64Latin1Encoding): boolean;
284
293
  // https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format
285
294
  // The signature field accepts a TypedArray type, but it is only available starting ES2017
286
295
  }
@@ -289,7 +298,8 @@ declare module "crypto" {
289
298
  function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman;
290
299
  function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | Binary): DiffieHellman;
291
300
  function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman;
292
- interface DiffieHellman {
301
+ class DiffieHellman {
302
+ private constructor();
293
303
  generateKeys(): Buffer;
294
304
  generateKeys(encoding: HexBase64Latin1Encoding): string;
295
305
  computeSecret(other_public_key: Binary): Buffer;
@@ -368,6 +378,7 @@ declare module "crypto" {
368
378
  function getCurves(): string[];
369
379
  function getHashes(): string[];
370
380
  class ECDH {
381
+ private constructor();
371
382
  static convertKey(
372
383
  key: BinaryLike,
373
384
  curve: string,
node/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "11.11.7",
3
+ "version": "11.11.8",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -206,6 +206,6 @@
206
206
  },
207
207
  "scripts": {},
208
208
  "dependencies": {},
209
- "typesPublisherContentHash": "b4de8d8d7165ef119fc6b22ad85204c93f32b34f8ef89c48358e4a5d81e26a38",
209
+ "typesPublisherContentHash": "8023382f44f0b3465f2d9182e61febc5c6e525800eaad1777475b56269a7dceb",
210
210
  "typeScriptVersion": "2.0"
211
211
  }