@types/node 10.17.49 → 10.17.50

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 v10.17/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/v10.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Sat, 12 Dec 2020 17:18:35 GMT
11
+ * Last updated: Wed, 23 Dec 2020 20:23:34 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Buffer`, `NodeJS`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `require`, `setImmediate`, `setInterval`, `setTimeout`
14
14
 
node v10.17/crypto.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- declare module "crypto" {
2
- import * as stream from "stream";
1
+ declare module 'crypto' {
2
+ import * as stream from 'stream';
3
3
 
4
4
  interface Certificate {
5
5
  exportChallenge(spkac: string | Buffer | NodeJS.TypedArray | DataView): Buffer;
@@ -7,7 +7,7 @@ declare module "crypto" {
7
7
  verifySpkac(spkac: Buffer | NodeJS.TypedArray | DataView): boolean;
8
8
  }
9
9
  const Certificate: {
10
- new(): Certificate;
10
+ new (): Certificate;
11
11
  (): Certificate;
12
12
  };
13
13
 
@@ -24,17 +24,23 @@ declare module "crypto" {
24
24
  ciphers: string;
25
25
  }
26
26
  /** @deprecated since v0.11.13 - use tls.SecureContext instead. */
27
- interface Credentials { context?: any; }
27
+ interface Credentials {
28
+ context?: any;
29
+ }
28
30
  /** @deprecated since v0.11.13 - use tls.createSecureContext instead. */
29
31
  function createCredentials(details: CredentialDetails): Credentials;
30
32
  function createHash(algorithm: string, options?: stream.TransformOptions): Hash;
31
- function createHmac(algorithm: string, key: string | Buffer | NodeJS.TypedArray | DataView, options?: stream.TransformOptions): Hmac;
33
+ function createHmac(
34
+ algorithm: string,
35
+ key: string | Buffer | NodeJS.TypedArray | DataView,
36
+ options?: stream.TransformOptions,
37
+ ): Hmac;
32
38
 
33
- type Utf8AsciiLatin1Encoding = "utf8" | "ascii" | "latin1";
34
- type HexBase64Latin1Encoding = "latin1" | "hex" | "base64";
35
- type Utf8AsciiBinaryEncoding = "utf8" | "ascii" | "binary";
36
- type HexBase64BinaryEncoding = "binary" | "base64" | "hex";
37
- type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";
39
+ type Utf8AsciiLatin1Encoding = 'utf8' | 'ascii' | 'latin1';
40
+ type HexBase64Latin1Encoding = 'latin1' | 'hex' | 'base64';
41
+ type Utf8AsciiBinaryEncoding = 'utf8' | 'ascii' | 'binary';
42
+ type HexBase64BinaryEncoding = 'binary' | 'base64' | 'hex';
43
+ type ECDHKeyFormat = 'compressed' | 'uncompressed' | 'hybrid';
38
44
 
39
45
  interface Hash extends stream.Transform {
40
46
  update(data: string | Buffer | NodeJS.TypedArray | DataView): Hash;
@@ -57,21 +63,52 @@ declare module "crypto" {
57
63
  authTagLength?: number;
58
64
  }
59
65
  /** @deprecated since v10.0.0 use createCipheriv() */
60
- function createCipher(algorithm: CipherCCMTypes, password: string | Buffer | NodeJS.TypedArray | DataView, options: CipherCCMOptions): CipherCCM;
66
+ function createCipher(
67
+ algorithm: CipherCCMTypes,
68
+ password: string | Buffer | NodeJS.TypedArray | DataView,
69
+ options: CipherCCMOptions,
70
+ ): CipherCCM;
61
71
  /** @deprecated since v10.0.0 use createCipheriv() */
62
- function createCipher(algorithm: CipherGCMTypes, password: string | Buffer | NodeJS.TypedArray | DataView, options?: CipherGCMOptions): CipherGCM;
72
+ function createCipher(
73
+ algorithm: CipherGCMTypes,
74
+ password: string | Buffer | NodeJS.TypedArray | DataView,
75
+ options?: CipherGCMOptions,
76
+ ): CipherGCM;
63
77
  /** @deprecated since v10.0.0 use createCipheriv() */
64
- function createCipher(algorithm: string, password: string | Buffer | NodeJS.TypedArray | DataView, options?: stream.TransformOptions): Cipher;
78
+ function createCipher(
79
+ algorithm: string,
80
+ password: string | Buffer | NodeJS.TypedArray | DataView,
81
+ options?: stream.TransformOptions,
82
+ ): Cipher;
65
83
 
66
- function createCipheriv(algorithm: CipherCCMTypes, key: string | Buffer | NodeJS.TypedArray | DataView, iv: string | Buffer | NodeJS.TypedArray | DataView, options: CipherCCMOptions): CipherCCM;
67
- function createCipheriv(algorithm: CipherGCMTypes, key: string | Buffer | NodeJS.TypedArray | DataView, iv: string | Buffer | NodeJS.TypedArray | DataView, options?: CipherGCMOptions): CipherGCM;
68
- function createCipheriv(algorithm: string, key: string | Buffer | NodeJS.TypedArray | DataView, iv: string | Buffer | NodeJS.TypedArray | DataView, options?: stream.TransformOptions): Cipher;
84
+ function createCipheriv(
85
+ algorithm: CipherCCMTypes,
86
+ key: string | Buffer | NodeJS.TypedArray | DataView,
87
+ iv: string | Buffer | NodeJS.TypedArray | DataView,
88
+ options: CipherCCMOptions,
89
+ ): CipherCCM;
90
+ function createCipheriv(
91
+ algorithm: CipherGCMTypes,
92
+ key: string | Buffer | NodeJS.TypedArray | DataView,
93
+ iv: string | Buffer | NodeJS.TypedArray | DataView,
94
+ options?: CipherGCMOptions,
95
+ ): CipherGCM;
96
+ function createCipheriv(
97
+ algorithm: string,
98
+ key: string | Buffer | NodeJS.TypedArray | DataView,
99
+ iv: string | Buffer | NodeJS.TypedArray | DataView,
100
+ options?: stream.TransformOptions,
101
+ ): Cipher;
69
102
 
70
103
  interface Cipher extends stream.Transform {
71
104
  update(data: string | Buffer | NodeJS.TypedArray | DataView): Buffer;
72
105
  update(data: string, input_encoding: Utf8AsciiBinaryEncoding): Buffer;
73
106
  update(data: Buffer | NodeJS.TypedArray | DataView, output_encoding: HexBase64BinaryEncoding): string;
74
- update(data: Buffer | NodeJS.TypedArray | DataView, input_encoding: any, output_encoding: HexBase64BinaryEncoding): string;
107
+ update(
108
+ data: Buffer | NodeJS.TypedArray | DataView,
109
+ input_encoding: any,
110
+ output_encoding: HexBase64BinaryEncoding,
111
+ ): string;
75
112
  // second arg ignored
76
113
  update(data: string, input_encoding: Utf8AsciiBinaryEncoding, output_encoding: HexBase64BinaryEncoding): string;
77
114
  final(): Buffer;
@@ -89,11 +126,23 @@ declare module "crypto" {
89
126
  getAuthTag(): Buffer;
90
127
  }
91
128
  /** @deprecated since v10.0.0 use createDecipheriv() */
92
- function createDecipher(algorithm: CipherCCMTypes, password: string | Buffer | NodeJS.TypedArray | DataView, options: CipherCCMOptions): DecipherCCM;
129
+ function createDecipher(
130
+ algorithm: CipherCCMTypes,
131
+ password: string | Buffer | NodeJS.TypedArray | DataView,
132
+ options: CipherCCMOptions,
133
+ ): DecipherCCM;
93
134
  /** @deprecated since v10.0.0 use createDecipheriv() */
94
- function createDecipher(algorithm: CipherGCMTypes, password: string | Buffer | NodeJS.TypedArray | DataView, options?: CipherGCMOptions): DecipherGCM;
135
+ function createDecipher(
136
+ algorithm: CipherGCMTypes,
137
+ password: string | Buffer | NodeJS.TypedArray | DataView,
138
+ options?: CipherGCMOptions,
139
+ ): DecipherGCM;
95
140
  /** @deprecated since v10.0.0 use createDecipheriv() */
96
- function createDecipher(algorithm: string, password: string | Buffer | NodeJS.TypedArray | DataView, options?: stream.TransformOptions): Decipher;
141
+ function createDecipher(
142
+ algorithm: string,
143
+ password: string | Buffer | NodeJS.TypedArray | DataView,
144
+ options?: stream.TransformOptions,
145
+ ): Decipher;
97
146
 
98
147
  function createDecipheriv(
99
148
  algorithm: CipherCCMTypes,
@@ -107,12 +156,21 @@ declare module "crypto" {
107
156
  iv: string | Buffer | NodeJS.TypedArray | DataView,
108
157
  options?: CipherGCMOptions,
109
158
  ): DecipherGCM;
110
- function createDecipheriv(algorithm: string, key: string | Buffer | NodeJS.TypedArray | DataView, iv: string | Buffer | NodeJS.TypedArray | DataView, options?: stream.TransformOptions): Decipher;
159
+ function createDecipheriv(
160
+ algorithm: string,
161
+ key: string | Buffer | NodeJS.TypedArray | DataView,
162
+ iv: string | Buffer | NodeJS.TypedArray | DataView,
163
+ options?: stream.TransformOptions,
164
+ ): Decipher;
111
165
 
112
166
  interface Decipher extends stream.Transform {
113
167
  update(data: Buffer | NodeJS.TypedArray | DataView): Buffer;
114
168
  update(data: string, input_encoding: HexBase64BinaryEncoding): Buffer;
115
- update(data: Buffer | NodeJS.TypedArray | DataView, input_encoding: HexBase64BinaryEncoding | undefined, output_encoding: Utf8AsciiBinaryEncoding): string;
169
+ update(
170
+ data: Buffer | NodeJS.TypedArray | DataView,
171
+ input_encoding: HexBase64BinaryEncoding | undefined,
172
+ output_encoding: Utf8AsciiBinaryEncoding,
173
+ ): string;
116
174
  // second arg is ignored
117
175
  update(data: string, input_encoding: HexBase64BinaryEncoding, output_encoding: Utf8AsciiBinaryEncoding): string;
118
176
  final(): Buffer;
@@ -134,8 +192,11 @@ declare module "crypto" {
134
192
  interface Signer extends NodeJS.WritableStream {
135
193
  update(data: string | Buffer | NodeJS.TypedArray | DataView): Signer;
136
194
  update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer;
137
- sign(private_key: string | { key: string; passphrase?: string, padding?: number, saltLength?: number }): Buffer;
138
- sign(private_key: string | { key: string; passphrase?: string, padding?: number, saltLength?: number }, output_format: HexBase64Latin1Encoding): string;
195
+ sign(private_key: string | { key: string; passphrase?: string; padding?: number; saltLength?: number }): Buffer;
196
+ sign(
197
+ private_key: string | { key: string; passphrase?: string; padding?: number; saltLength?: number },
198
+ output_format: HexBase64Latin1Encoding,
199
+ ): string;
139
200
  }
140
201
  function createVerify(algorith: string, options?: stream.WritableOptions): Verify;
141
202
  interface Verify extends NodeJS.WritableStream {
@@ -146,18 +207,37 @@ declare module "crypto" {
146
207
  // https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format
147
208
  // The signature field accepts a TypedArray type, but it is only available starting ES2017
148
209
  }
149
- function createDiffieHellman(prime_length: number, generator?: number | Buffer | NodeJS.TypedArray | DataView): DiffieHellman;
210
+ function createDiffieHellman(
211
+ prime_length: number,
212
+ generator?: number | Buffer | NodeJS.TypedArray | DataView,
213
+ ): DiffieHellman;
150
214
  function createDiffieHellman(prime: Buffer | NodeJS.TypedArray | DataView): DiffieHellman;
151
215
  function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding): DiffieHellman;
152
- function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: number | Buffer | NodeJS.TypedArray | DataView): DiffieHellman;
153
- function createDiffieHellman(prime: string, prime_encoding: HexBase64Latin1Encoding, generator: string, generator_encoding: HexBase64Latin1Encoding): DiffieHellman;
216
+ function createDiffieHellman(
217
+ prime: string,
218
+ prime_encoding: HexBase64Latin1Encoding,
219
+ generator: number | Buffer | NodeJS.TypedArray | DataView,
220
+ ): DiffieHellman;
221
+ function createDiffieHellman(
222
+ prime: string,
223
+ prime_encoding: HexBase64Latin1Encoding,
224
+ generator: string,
225
+ generator_encoding: HexBase64Latin1Encoding,
226
+ ): DiffieHellman;
154
227
  interface DiffieHellman {
155
228
  generateKeys(): Buffer;
156
229
  generateKeys(encoding: HexBase64Latin1Encoding): string;
157
230
  computeSecret(other_public_key: Buffer | NodeJS.TypedArray | DataView): Buffer;
158
231
  computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer;
159
- computeSecret(other_public_key: Buffer | NodeJS.TypedArray | DataView, output_encoding: HexBase64Latin1Encoding): string;
160
- computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string;
232
+ computeSecret(
233
+ other_public_key: Buffer | NodeJS.TypedArray | DataView,
234
+ output_encoding: HexBase64Latin1Encoding,
235
+ ): string;
236
+ computeSecret(
237
+ other_public_key: string,
238
+ input_encoding: HexBase64Latin1Encoding,
239
+ output_encoding: HexBase64Latin1Encoding,
240
+ ): string;
161
241
  getPrime(): Buffer;
162
242
  getPrime(encoding: HexBase64Latin1Encoding): string;
163
243
  getGenerator(): Buffer;
@@ -181,19 +261,44 @@ declare module "crypto" {
181
261
  digest: string,
182
262
  callback: (err: Error | null, derivedKey: Buffer) => any,
183
263
  ): void;
184
- function pbkdf2Sync(password: string | Buffer | NodeJS.TypedArray | DataView, salt: string | Buffer | NodeJS.TypedArray | DataView, iterations: number, keylen: number, digest: string): Buffer;
264
+ function pbkdf2Sync(
265
+ password: string | Buffer | NodeJS.TypedArray | DataView,
266
+ salt: string | Buffer | NodeJS.TypedArray | DataView,
267
+ iterations: number,
268
+ keylen: number,
269
+ digest: string,
270
+ ): Buffer;
185
271
 
186
272
  function randomBytes(size: number): Buffer;
187
273
  function randomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
188
274
  function pseudoRandomBytes(size: number): Buffer;
189
275
  function pseudoRandomBytes(size: number, callback: (err: Error | null, buf: Buffer) => void): void;
190
276
 
191
- function randomFillSync<T extends Buffer | NodeJS.TypedArray | DataView>(buffer: T, offset?: number, size?: number): T;
192
- function randomFill<T extends Buffer | NodeJS.TypedArray | DataView>(buffer: T, callback: (err: Error | null, buf: T) => void): void;
193
- function randomFill<T extends Buffer | NodeJS.TypedArray | DataView>(buffer: T, offset: number, callback: (err: Error | null, buf: T) => void): void;
194
- function randomFill<T extends Buffer | NodeJS.TypedArray | DataView>(buffer: T, offset: number, size: number, callback: (err: Error | null, buf: T) => void): void;
277
+ function randomFillSync<T extends Buffer | NodeJS.TypedArray | DataView>(
278
+ buffer: T,
279
+ offset?: number,
280
+ size?: number,
281
+ ): T;
282
+ function randomFill<T extends Buffer | NodeJS.TypedArray | DataView>(
283
+ buffer: T,
284
+ callback: (err: Error | null, buf: T) => void,
285
+ ): void;
286
+ function randomFill<T extends Buffer | NodeJS.TypedArray | DataView>(
287
+ buffer: T,
288
+ offset: number,
289
+ callback: (err: Error | null, buf: T) => void,
290
+ ): void;
291
+ function randomFill<T extends Buffer | NodeJS.TypedArray | DataView>(
292
+ buffer: T,
293
+ offset: number,
294
+ size: number,
295
+ callback: (err: Error | null, buf: T) => void,
296
+ ): void;
195
297
 
196
298
  interface ScryptOptions {
299
+ cost?: number;
300
+ blockSize?: number;
301
+ parallelization?: number;
197
302
  N?: number;
198
303
  r?: number;
199
304
  p?: number;
@@ -202,7 +307,8 @@ declare module "crypto" {
202
307
  function scrypt(
203
308
  password: string | Buffer | NodeJS.TypedArray | DataView,
204
309
  salt: string | Buffer | NodeJS.TypedArray | DataView,
205
- keylen: number, callback: (err: Error | null, derivedKey: Buffer) => void,
310
+ keylen: number,
311
+ callback: (err: Error | null, derivedKey: Buffer) => void,
206
312
  ): void;
207
313
  function scrypt(
208
314
  password: string | Buffer | NodeJS.TypedArray | DataView,
@@ -211,7 +317,12 @@ declare module "crypto" {
211
317
  options: ScryptOptions,
212
318
  callback: (err: Error | null, derivedKey: Buffer) => void,
213
319
  ): void;
214
- function scryptSync(password: string | Buffer | NodeJS.TypedArray | DataView, salt: string | Buffer | NodeJS.TypedArray | DataView, keylen: number, options?: ScryptOptions): Buffer;
320
+ function scryptSync(
321
+ password: string | Buffer | NodeJS.TypedArray | DataView,
322
+ salt: string | Buffer | NodeJS.TypedArray | DataView,
323
+ keylen: number,
324
+ options?: ScryptOptions,
325
+ ): Buffer;
215
326
 
216
327
  interface RsaPublicKey {
217
328
  key: string;
@@ -235,15 +346,22 @@ declare module "crypto" {
235
346
  key: string | Buffer | NodeJS.TypedArray | DataView,
236
347
  curve: string,
237
348
  inputEncoding?: HexBase64Latin1Encoding,
238
- outputEncoding?: "latin1" | "hex" | "base64",
239
- format?: "uncompressed" | "compressed" | "hybrid",
349
+ outputEncoding?: 'latin1' | 'hex' | 'base64',
350
+ format?: 'uncompressed' | 'compressed' | 'hybrid',
240
351
  ): Buffer | string;
241
352
  generateKeys(): Buffer;
242
353
  generateKeys(encoding: HexBase64Latin1Encoding, format?: ECDHKeyFormat): string;
243
354
  computeSecret(other_public_key: Buffer | NodeJS.TypedArray | DataView): Buffer;
244
355
  computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding): Buffer;
245
- computeSecret(other_public_key: Buffer | NodeJS.TypedArray | DataView, output_encoding: HexBase64Latin1Encoding): string;
246
- computeSecret(other_public_key: string, input_encoding: HexBase64Latin1Encoding, output_encoding: HexBase64Latin1Encoding): string;
356
+ computeSecret(
357
+ other_public_key: Buffer | NodeJS.TypedArray | DataView,
358
+ output_encoding: HexBase64Latin1Encoding,
359
+ ): string;
360
+ computeSecret(
361
+ other_public_key: string,
362
+ input_encoding: HexBase64Latin1Encoding,
363
+ output_encoding: HexBase64Latin1Encoding,
364
+ ): string;
247
365
  getPrivateKey(): Buffer;
248
366
  getPrivateKey(encoding: HexBase64Latin1Encoding): string;
249
367
  getPublicKey(): Buffer;
@@ -252,7 +370,10 @@ declare module "crypto" {
252
370
  setPrivateKey(private_key: string, encoding: HexBase64Latin1Encoding): void;
253
371
  }
254
372
  function createECDH(curve_name: string): ECDH;
255
- function timingSafeEqual(a: Buffer | NodeJS.TypedArray | DataView, b: Buffer | NodeJS.TypedArray | DataView): boolean;
373
+ function timingSafeEqual(
374
+ a: Buffer | NodeJS.TypedArray | DataView,
375
+ b: Buffer | NodeJS.TypedArray | DataView,
376
+ ): boolean;
256
377
  /** @deprecated since v10.0.0 */
257
378
  const DEFAULT_ENCODING: string;
258
379
 
@@ -323,50 +444,170 @@ declare module "crypto" {
323
444
  privateKey: T2;
324
445
  }
325
446
 
326
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
327
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
328
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
329
- function generateKeyPairSync(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
330
-
331
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
332
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
333
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
334
- function generateKeyPairSync(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
335
-
336
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>): KeyPairSyncResult<string, string>;
337
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>): KeyPairSyncResult<string, Buffer>;
338
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>): KeyPairSyncResult<Buffer, string>;
339
- function generateKeyPairSync(type: 'ec', options: ECKeyPairOptions<'der', 'der'>): KeyPairSyncResult<Buffer, Buffer>;
340
-
341
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
342
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
343
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
344
- function generateKeyPair(type: 'rsa', options: RSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
447
+ function generateKeyPairSync(
448
+ type: 'rsa',
449
+ options: RSAKeyPairOptions<'pem', 'pem'>,
450
+ ): KeyPairSyncResult<string, string>;
451
+ function generateKeyPairSync(
452
+ type: 'rsa',
453
+ options: RSAKeyPairOptions<'pem', 'der'>,
454
+ ): KeyPairSyncResult<string, Buffer>;
455
+ function generateKeyPairSync(
456
+ type: 'rsa',
457
+ options: RSAKeyPairOptions<'der', 'pem'>,
458
+ ): KeyPairSyncResult<Buffer, string>;
459
+ function generateKeyPairSync(
460
+ type: 'rsa',
461
+ options: RSAKeyPairOptions<'der', 'der'>,
462
+ ): KeyPairSyncResult<Buffer, Buffer>;
463
+
464
+ function generateKeyPairSync(
465
+ type: 'dsa',
466
+ options: DSAKeyPairOptions<'pem', 'pem'>,
467
+ ): KeyPairSyncResult<string, string>;
468
+ function generateKeyPairSync(
469
+ type: 'dsa',
470
+ options: DSAKeyPairOptions<'pem', 'der'>,
471
+ ): KeyPairSyncResult<string, Buffer>;
472
+ function generateKeyPairSync(
473
+ type: 'dsa',
474
+ options: DSAKeyPairOptions<'der', 'pem'>,
475
+ ): KeyPairSyncResult<Buffer, string>;
476
+ function generateKeyPairSync(
477
+ type: 'dsa',
478
+ options: DSAKeyPairOptions<'der', 'der'>,
479
+ ): KeyPairSyncResult<Buffer, Buffer>;
480
+
481
+ function generateKeyPairSync(
482
+ type: 'ec',
483
+ options: ECKeyPairOptions<'pem', 'pem'>,
484
+ ): KeyPairSyncResult<string, string>;
485
+ function generateKeyPairSync(
486
+ type: 'ec',
487
+ options: ECKeyPairOptions<'pem', 'der'>,
488
+ ): KeyPairSyncResult<string, Buffer>;
489
+ function generateKeyPairSync(
490
+ type: 'ec',
491
+ options: ECKeyPairOptions<'der', 'pem'>,
492
+ ): KeyPairSyncResult<Buffer, string>;
493
+ function generateKeyPairSync(
494
+ type: 'ec',
495
+ options: ECKeyPairOptions<'der', 'der'>,
496
+ ): KeyPairSyncResult<Buffer, Buffer>;
497
+
498
+ function generateKeyPair(
499
+ type: 'rsa',
500
+ options: RSAKeyPairOptions<'pem', 'pem'>,
501
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
502
+ ): void;
503
+ function generateKeyPair(
504
+ type: 'rsa',
505
+ options: RSAKeyPairOptions<'pem', 'der'>,
506
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
507
+ ): void;
508
+ function generateKeyPair(
509
+ type: 'rsa',
510
+ options: RSAKeyPairOptions<'der', 'pem'>,
511
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
512
+ ): void;
513
+ function generateKeyPair(
514
+ type: 'rsa',
515
+ options: RSAKeyPairOptions<'der', 'der'>,
516
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
517
+ ): void;
345
518
 
346
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
347
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
348
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
349
- function generateKeyPair(type: 'dsa', options: DSAKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
519
+ function generateKeyPair(
520
+ type: 'dsa',
521
+ options: DSAKeyPairOptions<'pem', 'pem'>,
522
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
523
+ ): void;
524
+ function generateKeyPair(
525
+ type: 'dsa',
526
+ options: DSAKeyPairOptions<'pem', 'der'>,
527
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
528
+ ): void;
529
+ function generateKeyPair(
530
+ type: 'dsa',
531
+ options: DSAKeyPairOptions<'der', 'pem'>,
532
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
533
+ ): void;
534
+ function generateKeyPair(
535
+ type: 'dsa',
536
+ options: DSAKeyPairOptions<'der', 'der'>,
537
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
538
+ ): void;
350
539
 
351
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'pem'>, callback: (err: Error | null, publicKey: string, privateKey: string) => void): void;
352
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'pem', 'der'>, callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void): void;
353
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'pem'>, callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void): void;
354
- function generateKeyPair(type: 'ec', options: ECKeyPairOptions<'der', 'der'>, callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void): void;
540
+ function generateKeyPair(
541
+ type: 'ec',
542
+ options: ECKeyPairOptions<'pem', 'pem'>,
543
+ callback: (err: Error | null, publicKey: string, privateKey: string) => void,
544
+ ): void;
545
+ function generateKeyPair(
546
+ type: 'ec',
547
+ options: ECKeyPairOptions<'pem', 'der'>,
548
+ callback: (err: Error | null, publicKey: string, privateKey: Buffer) => void,
549
+ ): void;
550
+ function generateKeyPair(
551
+ type: 'ec',
552
+ options: ECKeyPairOptions<'der', 'pem'>,
553
+ callback: (err: Error | null, publicKey: Buffer, privateKey: string) => void,
554
+ ): void;
555
+ function generateKeyPair(
556
+ type: 'ec',
557
+ options: ECKeyPairOptions<'der', 'der'>,
558
+ callback: (err: Error | null, publicKey: Buffer, privateKey: Buffer) => void,
559
+ ): void;
355
560
 
356
561
  namespace generateKeyPair {
357
- function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
358
- function __promisify__(type: "rsa", options: RSAKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
359
- function __promisify__(type: "rsa", options: RSAKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
360
- function __promisify__(type: "rsa", options: RSAKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
361
-
362
- function __promisify__(type: "dsa", options: DSAKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
363
- function __promisify__(type: "dsa", options: DSAKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
364
- function __promisify__(type: "dsa", options: DSAKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
365
- function __promisify__(type: "dsa", options: DSAKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
366
-
367
- function __promisify__(type: "ec", options: ECKeyPairOptions<'pem', 'pem'>): Promise<{ publicKey: string, privateKey: string }>;
368
- function __promisify__(type: "ec", options: ECKeyPairOptions<'pem', 'der'>): Promise<{ publicKey: string, privateKey: Buffer }>;
369
- function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'pem'>): Promise<{ publicKey: Buffer, privateKey: string }>;
370
- function __promisify__(type: "ec", options: ECKeyPairOptions<'der', 'der'>): Promise<{ publicKey: Buffer, privateKey: Buffer }>;
562
+ function __promisify__(
563
+ type: 'rsa',
564
+ options: RSAKeyPairOptions<'pem', 'pem'>,
565
+ ): Promise<{ publicKey: string; privateKey: string }>;
566
+ function __promisify__(
567
+ type: 'rsa',
568
+ options: RSAKeyPairOptions<'pem', 'der'>,
569
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
570
+ function __promisify__(
571
+ type: 'rsa',
572
+ options: RSAKeyPairOptions<'der', 'pem'>,
573
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
574
+ function __promisify__(
575
+ type: 'rsa',
576
+ options: RSAKeyPairOptions<'der', 'der'>,
577
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
578
+
579
+ function __promisify__(
580
+ type: 'dsa',
581
+ options: DSAKeyPairOptions<'pem', 'pem'>,
582
+ ): Promise<{ publicKey: string; privateKey: string }>;
583
+ function __promisify__(
584
+ type: 'dsa',
585
+ options: DSAKeyPairOptions<'pem', 'der'>,
586
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
587
+ function __promisify__(
588
+ type: 'dsa',
589
+ options: DSAKeyPairOptions<'der', 'pem'>,
590
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
591
+ function __promisify__(
592
+ type: 'dsa',
593
+ options: DSAKeyPairOptions<'der', 'der'>,
594
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
595
+
596
+ function __promisify__(
597
+ type: 'ec',
598
+ options: ECKeyPairOptions<'pem', 'pem'>,
599
+ ): Promise<{ publicKey: string; privateKey: string }>;
600
+ function __promisify__(
601
+ type: 'ec',
602
+ options: ECKeyPairOptions<'pem', 'der'>,
603
+ ): Promise<{ publicKey: string; privateKey: Buffer }>;
604
+ function __promisify__(
605
+ type: 'ec',
606
+ options: ECKeyPairOptions<'der', 'pem'>,
607
+ ): Promise<{ publicKey: Buffer; privateKey: string }>;
608
+ function __promisify__(
609
+ type: 'ec',
610
+ options: ECKeyPairOptions<'der', 'der'>,
611
+ ): Promise<{ publicKey: Buffer; privateKey: Buffer }>;
371
612
  }
372
613
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "10.17.49",
3
+ "version": "10.17.50",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -196,6 +196,6 @@
196
196
  },
197
197
  "scripts": {},
198
198
  "dependencies": {},
199
- "typesPublisherContentHash": "eb547bb67b23d65a49166c1c05f08e07d22c03e60c5e463c48d4a3fada31f165",
199
+ "typesPublisherContentHash": "622e351f53a6586632c27cc24d205ec00ab4b0f7dc469f14ef492b96cfe3b4a1",
200
200
  "typeScriptVersion": "3.3"
201
201
  }