update node.d.ts (publicEncrypt & privateDecrypt)

added rsa function to encrypt and decrypt
This commit is contained in:
r-ising
2015-12-07 14:31:58 +01:00
parent 8cd79728ef
commit 94cc10600a
+11
View File
@@ -1670,6 +1670,17 @@ declare module "crypto" {
export function randomBytes(size: number, callback: (err: Error, buf: Buffer) =>void ): void;
export function pseudoRandomBytes(size: number): Buffer;
export function pseudoRandomBytes(size: number, callback: (err: Error, buf: Buffer) =>void ): void;
export interface RsaPublicKey {
key: string;
padding: any;
}
export interface RsaPrivateKey {
key: string;
passphrase: string,
padding: any;
}
export function publicEncrypt(public_key: string|RsaPublicKey, buffer: Buffer): Buffer
export function privateDecrypt(private_key: string|RsaPrivateKey, buffer: Buffer): Buffer
}
declare module "stream" {