From d70a9a1d9efb74385df6c35adbdb5a4ccf5934f3 Mon Sep 17 00:00:00 2001 From: Maxim Makarov Date: Thu, 15 Nov 2018 03:11:16 +0300 Subject: [PATCH] passphrase is optional in signer (#30360) --- types/node/index.d.ts | 4 ++-- types/node/v6/index.d.ts | 4 ++-- types/node/v7/index.d.ts | 4 ++-- types/node/v8/index.d.ts | 4 ++-- types/node/v9/index.d.ts | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/types/node/index.d.ts b/types/node/index.d.ts index d2d6f4513f..ac04693058 100644 --- a/types/node/index.d.ts +++ b/types/node/index.d.ts @@ -6372,8 +6372,8 @@ declare module "crypto" { interface Signer extends NodeJS.WritableStream { update(data: string | Buffer | NodeJS.TypedArray | DataView): Signer; update(data: string, input_encoding: Utf8AsciiLatin1Encoding): Signer; - sign(private_key: string | { key: string; passphrase: string, padding?: number, saltLength?: number }): Buffer; - sign(private_key: string | { key: string; passphrase: string, padding?: number, saltLength?: number }, output_format: HexBase64Latin1Encoding): string; + sign(private_key: string | { key: string; passphrase?: string, padding?: number, saltLength?: number }): Buffer; + sign(private_key: string | { key: string; passphrase?: string, padding?: number, saltLength?: number }, output_format: HexBase64Latin1Encoding): string; } function createVerify(algorith: string, options?: stream.WritableOptions): Verify; interface Verify extends NodeJS.WritableStream { diff --git a/types/node/v6/index.d.ts b/types/node/v6/index.d.ts index 250a7b6640..5ed74da702 100644 --- a/types/node/v6/index.d.ts +++ b/types/node/v6/index.d.ts @@ -3617,8 +3617,8 @@ declare module "crypto" { export interface Signer extends NodeJS.WritableStream { update(data: string | Buffer): Signer; update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Signer; - sign(private_key: string | { key: string; passphrase: string }): Buffer; - sign(private_key: string | { key: string; passphrase: string }, output_format: HexBase64Latin1Encoding): string; + sign(private_key: string | { key: string; passphrase?: string }): Buffer; + sign(private_key: string | { key: string; passphrase?: string }, output_format: HexBase64Latin1Encoding): string; } export function createVerify(algorith: string): Verify; export interface Verify extends NodeJS.WritableStream { diff --git a/types/node/v7/index.d.ts b/types/node/v7/index.d.ts index 55cea44126..932d988912 100644 --- a/types/node/v7/index.d.ts +++ b/types/node/v7/index.d.ts @@ -3654,8 +3654,8 @@ declare module "crypto" { export interface Signer extends NodeJS.WritableStream { update(data: string | Buffer): Signer; update(data: string | Buffer, input_encoding: Utf8AsciiLatin1Encoding): Signer; - sign(private_key: string | { key: string; passphrase: string }): Buffer; - sign(private_key: string | { key: string; passphrase: string }, output_format: HexBase64Latin1Encoding): string; + sign(private_key: string | { key: string; passphrase?: string }): Buffer; + sign(private_key: string | { key: string; passphrase?: string }, output_format: HexBase64Latin1Encoding): string; } export function createVerify(algorith: string): Verify; export interface Verify extends NodeJS.WritableStream { diff --git a/types/node/v8/index.d.ts b/types/node/v8/index.d.ts index d0497223dc..6a2ca10859 100644 --- a/types/node/v8/index.d.ts +++ b/types/node/v8/index.d.ts @@ -5327,8 +5327,8 @@ declare module "crypto" { export interface Signer extends NodeJS.WritableStream { update(data: string | Buffer | DataView): Signer; update(data: string | Buffer | DataView, input_encoding: Utf8AsciiLatin1Encoding): Signer; - sign(private_key: string | { key: string; passphrase: string }): Buffer; - sign(private_key: string | { key: string; passphrase: string }, output_format: HexBase64Latin1Encoding): string; + sign(private_key: string | { key: string; passphrase?: string }): Buffer; + sign(private_key: string | { key: string; passphrase?: string }, output_format: HexBase64Latin1Encoding): string; } export function createVerify(algorith: string): Verify; export interface Verify extends NodeJS.WritableStream { diff --git a/types/node/v9/index.d.ts b/types/node/v9/index.d.ts index 9da7f57879..268f398f73 100644 --- a/types/node/v9/index.d.ts +++ b/types/node/v9/index.d.ts @@ -5488,8 +5488,8 @@ declare module "crypto" { export interface Signer extends NodeJS.WritableStream { update(data: string | Buffer | DataView): Signer; update(data: string | Buffer | DataView, input_encoding: Utf8AsciiLatin1Encoding): Signer; - sign(private_key: string | { key: string; passphrase: string }): Buffer; - sign(private_key: string | { key: string; passphrase: string }, output_format: HexBase64Latin1Encoding): string; + sign(private_key: string | { key: string; passphrase?: string }): Buffer; + sign(private_key: string | { key: string; passphrase?: string }, output_format: HexBase64Latin1Encoding): string; } export function createVerify(algorith: string): Verify; export interface Verify extends NodeJS.WritableStream {