mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #2062 from robertknight/rob-crypto_decipher_funcs
Export Node functions for creating decipher correctly
This commit is contained in:
Vendored
+3
-2
@@ -1031,9 +1031,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;
|
||||
@@ -1063,6 +1063,7 @@ declare module "crypto" {
|
||||
}
|
||||
export function getDiffieHellman(group_name: string): DiffieHellman;
|
||||
export function pbkdf2(password: string, salt: string, iterations: number, keylen: number, callback: (err: Error, derivedKey: string) => any): void;
|
||||
export function pbkdf2Sync(password: string, salt: string, iterations: number, keylen: number) : NodeBuffer;
|
||||
export function randomBytes(size: number): NodeBuffer;
|
||||
export function randomBytes(size: number, callback: (err: Error, buf: NodeBuffer) =>void ): void;
|
||||
export function pseudoRandomBytes(size: number): NodeBuffer;
|
||||
|
||||
Reference in New Issue
Block a user