mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-10-25 12:00:38 +08:00
update node.d.ts (publicEncrypt & privateDecrypt)
added rsa function to encrypt and decrypt
This commit is contained in:
1 parent
8cd79728ef
commit
94cc10600a
1 file changed
+11
Vendored
+11
@@ -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" {
|
||||
|
||||
Reference in new issue
Block a user