mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Changes agreed on in
https://github.com/borisyankov/DefinitelyTyped/pull/2309/files#r13778987 moved `createDecipher` function out of the cipher-interface
This commit is contained in:
parent
4a5d9c48f0
commit
ff66b8c00a
15
node/node.d.ts
vendored
15
node/node.d.ts
vendored
@ -1045,14 +1045,19 @@ declare module "crypto" {
|
||||
export interface Credentials { context?: any; }
|
||||
export function createCredentials(details: CredentialDetails): Credentials;
|
||||
export function createHash(algorithm: string): Hash;
|
||||
export function createHmac(algorithm: string, key: any): Hmac;
|
||||
export function createHmac(algorithm: string, key: string): Hmac;
|
||||
export function createHmac(algorithm: string, key: Buffer): Hmac;
|
||||
interface Hash {
|
||||
update(data: any, input_encoding?: string): Hash;
|
||||
digest(encoding?: string): any;
|
||||
digest(encoding: 'buffer'): Buffer;
|
||||
digest(encoding: string): any;
|
||||
digest(): Buffer;
|
||||
}
|
||||
interface Hmac {
|
||||
update(data: any, input_encoding?: string): Hmac;
|
||||
digest(encoding?: string): any;
|
||||
digest(encoding: 'buffer'): Buffer;
|
||||
digest(encoding: string): any;
|
||||
digest(): any;
|
||||
}
|
||||
export function createCipher(algorithm: string, password: any): Cipher;
|
||||
export function createCipheriv(algorithm: string, key: any, iv: any): Cipher;
|
||||
@ -1060,9 +1065,9 @@ declare module "crypto" {
|
||||
update(data: any, input_encoding?: string, output_encoding?: string): string;
|
||||
final(output_encoding?: string): string;
|
||||
setAutoPadding(auto_padding: boolean): void;
|
||||
createDecipher(algorithm: string, password: any): Decipher;
|
||||
createDecipheriv(algorithm: string, key: any, iv: any): Decipher;
|
||||
}
|
||||
export function createDecipher(algorithm: string, password: any): Decipher;
|
||||
export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher;
|
||||
interface Decipher {
|
||||
update(data: any, input_encoding?: string, output_encoding?: string): void;
|
||||
final(output_encoding?: string): string;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user