mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-24 11:50:59 +08:00
Add buffer methods to crypto.Cipher and Decipher
See http://nodejs.org/api/crypto.html#crypto_class_cipher and http://nodejs.org/api/crypto.html#crypto_class_decipher for details.
This commit is contained in:
1 parent
0eeb638c89
commit
85d4788a3e
2 files changed
+28
-4
No files matched your search
Vendored
+8
-4
@@ -1076,15 +1076,19 @@ declare module "crypto" {
|
||||
export function createCipher(algorithm: string, password: any): Cipher;
|
||||
export function createCipheriv(algorithm: string, key: any, iv: any): Cipher;
|
||||
interface Cipher {
|
||||
update(data: any, input_encoding?: string, output_encoding?: string): string;
|
||||
final(output_encoding?: string): string;
|
||||
update(data: Buffer): Buffer;
|
||||
update(data: string, input_encoding?: string, output_encoding?: string): string;
|
||||
final(): Buffer;
|
||||
final(output_encoding: string): string;
|
||||
setAutoPadding(auto_padding: boolean): void;
|
||||
}
|
||||
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): string;
|
||||
final(output_encoding?: string): string;
|
||||
update(data: Buffer): Buffer;
|
||||
update(data: string, input_encoding?: string, output_encoding?: string): string;
|
||||
final(): Buffer;
|
||||
final(output_encoding: string): string;
|
||||
setAutoPadding(auto_padding: boolean): void;
|
||||
}
|
||||
export function createSign(algorithm: string): Signer;
|
||||
|
||||
Reference in new issue
Block a user