Merge pull request #8576 from mrgleba/CipherStream

Cipher/decipher streams
This commit is contained in:
Masahiro Wakame
2016-03-19 12:30:40 +09:00

4
node/node.d.ts vendored
View File

@@ -1830,7 +1830,7 @@ declare module "crypto" {
}
export function createCipher(algorithm: string, password: any): Cipher;
export function createCipheriv(algorithm: string, key: any, iv: any): Cipher;
export interface Cipher {
export interface Cipher extends NodeJS.ReadWriteStream {
update(data: Buffer): Buffer;
update(data: string, input_encoding: "utf8"|"ascii"|"binary"): Buffer;
update(data: Buffer, input_encoding: any, output_encoding: "binary"|"base64"|"hex"): string;
@@ -1842,7 +1842,7 @@ declare module "crypto" {
}
export function createDecipher(algorithm: string, password: any): Decipher;
export function createDecipheriv(algorithm: string, key: any, iv: any): Decipher;
export interface Decipher {
export interface Decipher extends NodeJS.ReadWriteStream {
update(data: Buffer): Buffer;
update(data: string, input_encoding: "binary"|"base64"|"hex"): Buffer;
update(data: Buffer, input_encoding: any, output_encoding: "utf8"|"ascii"|"binary"): string;