Changed HMAC and Hash params to any, as Buffers are also allowed / returned.

This commit is contained in:
Jonathan Pirnay
2014-06-09 22:39:35 +02:00
parent b0ea8634fe
commit b07a83f244
+3 -3
View File
@@ -1040,14 +1040,14 @@ 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: string): Hmac;
export function createHmac(algorithm: string, key: any): Hmac;
interface Hash {
update(data: any, input_encoding?: string): Hash;
digest(encoding?: string): string;
digest(encoding?: string): any;
}
interface Hmac {
update(data: any, input_encoding?: string): Hmac;
digest(encoding?: string): string;
digest(encoding?: string): any;
}
export function createCipher(algorithm: string, password: any): Cipher;
export function createCipheriv(algorithm: string, key: any, iv: any): Cipher;