forked from chrisa/node-rsa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
node_rsa.h
39 lines (31 loc) · 900 Bytes
/
node_rsa.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include <node.h>
#include <node_object_wrap.h>
#include <v8.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/pem.h>
#include <openssl/x509.h>
#include <openssl/hmac.h>
#include <openssl/rsa.h>
#include <openssl/engine.h>
#include <openssl/rand.h>
namespace node {
class RsaKeypair : ObjectWrap {
public:
static void Initialize(v8::Handle<v8::Object> target);
protected:
static v8::Handle<v8::Value> New(const v8::Arguments& args);
static v8::Handle<v8::Value> SetPrivateKey(const v8::Arguments& args);
static v8::Handle<v8::Value> SetPublicKey(const v8::Arguments& args);
static v8::Handle<v8::Value> Encrypt(const v8::Arguments& args);
static v8::Handle<v8::Value> Decrypt(const v8::Arguments& args);
RsaKeypair() : ObjectWrap() {
}
~RsaKeypair() {
}
private:
RSA *publicKey;
RSA *privateKey;
};
} // namespace node