@types/node 12.12.61 → 12.12.62
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 v12.12/README.md +1 -1
- node v12.12/crypto.d.ts +20 -12
- node v12.12/package.json +2 -2
node v12.12/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/v12.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Thu, 17 Sep 2020 17:55:14 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
* Global values: `Buffer`, `NodeJS`, `__dirname`, `__filename`, `clearImmediate`, `clearInterval`, `clearTimeout`, `console`, `exports`, `global`, `module`, `process`, `queueMicrotask`, `require`, `setImmediate`, `setInterval`, `setTimeout`
|
|
14
14
|
|
node v12.12/crypto.d.ts
CHANGED
|
@@ -210,14 +210,14 @@ declare module "crypto" {
|
|
|
210
210
|
final(output_encoding: string): string;
|
|
211
211
|
setAutoPadding(auto_padding?: boolean): this;
|
|
212
212
|
// getAuthTag(): Buffer;
|
|
213
|
-
// setAAD(buffer:
|
|
213
|
+
// setAAD(buffer: NodeJS.ArrayBufferView): this;
|
|
214
214
|
}
|
|
215
215
|
interface CipherCCM extends Cipher {
|
|
216
|
-
setAAD(buffer:
|
|
216
|
+
setAAD(buffer: NodeJS.ArrayBufferView, options: { plaintextLength: number }): this;
|
|
217
217
|
getAuthTag(): Buffer;
|
|
218
218
|
}
|
|
219
219
|
interface CipherGCM extends Cipher {
|
|
220
|
-
setAAD(buffer:
|
|
220
|
+
setAAD(buffer: NodeJS.ArrayBufferView, options?: { plaintextLength: number }): this;
|
|
221
221
|
getAuthTag(): Buffer;
|
|
222
222
|
}
|
|
223
223
|
/** @deprecated since v10.0.0 use createDecipheriv() */
|
|
@@ -281,16 +281,27 @@ declare module "crypto" {
|
|
|
281
281
|
|
|
282
282
|
function createSign(algorithm: string, options?: stream.WritableOptions): Signer;
|
|
283
283
|
|
|
284
|
+
type DSAEncoding = 'der' | 'ieee-p1363';
|
|
285
|
+
|
|
284
286
|
interface SigningOptions {
|
|
285
287
|
/**
|
|
286
288
|
* @See crypto.constants.RSA_PKCS1_PADDING
|
|
287
289
|
*/
|
|
288
290
|
padding?: number;
|
|
289
291
|
saltLength?: number;
|
|
292
|
+
dsaEncoding?: DSAEncoding;
|
|
290
293
|
}
|
|
291
294
|
|
|
292
295
|
interface SignPrivateKeyInput extends PrivateKeyInput, SigningOptions {
|
|
293
296
|
}
|
|
297
|
+
interface SignKeyObjectInput extends SigningOptions {
|
|
298
|
+
key: KeyObject;
|
|
299
|
+
}
|
|
300
|
+
interface VerifyPublicKeyInput extends PublicKeyInput, SigningOptions {
|
|
301
|
+
}
|
|
302
|
+
interface VerifyKeyObjectInput extends SigningOptions {
|
|
303
|
+
key: KeyObject;
|
|
304
|
+
}
|
|
294
305
|
|
|
295
306
|
type KeyLike = string | Buffer | KeyObject;
|
|
296
307
|
|
|
@@ -299,8 +310,8 @@ declare module "crypto" {
|
|
|
299
310
|
|
|
300
311
|
update(data: BinaryLike): Signer;
|
|
301
312
|
update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer;
|
|
302
|
-
sign(private_key:
|
|
303
|
-
sign(private_key:
|
|
313
|
+
sign(private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
|
|
314
|
+
sign(private_key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput, output_format: HexBase64Latin1Encoding): string;
|
|
304
315
|
}
|
|
305
316
|
|
|
306
317
|
function createVerify(algorithm: string, options?: stream.WritableOptions): Verify;
|
|
@@ -309,8 +320,8 @@ declare module "crypto" {
|
|
|
309
320
|
|
|
310
321
|
update(data: BinaryLike): Verify;
|
|
311
322
|
update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Verify;
|
|
312
|
-
verify(object:
|
|
313
|
-
verify(object:
|
|
323
|
+
verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): boolean;
|
|
324
|
+
verify(object: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: string, signature_format?: HexBase64Latin1Encoding): boolean;
|
|
314
325
|
// https://nodejs.org/api/crypto.html#crypto_verifier_verify_object_signature_signature_format
|
|
315
326
|
// The signature field accepts a TypedArray type, but it is only available starting ES2017
|
|
316
327
|
}
|
|
@@ -598,10 +609,7 @@ declare module "crypto" {
|
|
|
598
609
|
* If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
|
|
599
610
|
* passed to [`crypto.createPrivateKey()`][].
|
|
600
611
|
*/
|
|
601
|
-
function sign(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignPrivateKeyInput): Buffer;
|
|
602
|
-
|
|
603
|
-
interface VerifyKeyWithOptions extends KeyObject, SigningOptions {
|
|
604
|
-
}
|
|
612
|
+
function sign(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | SignKeyObjectInput | SignPrivateKeyInput): Buffer;
|
|
605
613
|
|
|
606
614
|
/**
|
|
607
615
|
* Calculates and returns the signature for `data` using the given private key and
|
|
@@ -611,5 +619,5 @@ declare module "crypto" {
|
|
|
611
619
|
* If `key` is not a [`KeyObject`][], this function behaves as if `key` had been
|
|
612
620
|
* passed to [`crypto.createPublicKey()`][].
|
|
613
621
|
*/
|
|
614
|
-
function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike |
|
|
622
|
+
function verify(algorithm: string | null | undefined, data: NodeJS.ArrayBufferView, key: KeyLike | VerifyKeyObjectInput | VerifyPublicKeyInput, signature: NodeJS.ArrayBufferView): Buffer;
|
|
615
623
|
}
|
node v12.12/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "12.12.
|
|
3
|
+
"version": "12.12.62",
|
|
4
4
|
"description": "TypeScript definitions for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"contributors": [
|
|
@@ -231,6 +231,6 @@
|
|
|
231
231
|
},
|
|
232
232
|
"scripts": {},
|
|
233
233
|
"dependencies": {},
|
|
234
|
-
"typesPublisherContentHash": "
|
|
234
|
+
"typesPublisherContentHash": "872c2e50f957190b658ba87e71464f01ee125836a9d8033b19f4920ee6334c97",
|
|
235
235
|
"typeScriptVersion": "3.2"
|
|
236
236
|
}
|