summaryrefslogtreecommitdiff
path: root/nacl/crypto_sign/wrapper-keypair.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'nacl/crypto_sign/wrapper-keypair.cpp')
-rw-r--r--nacl/crypto_sign/wrapper-keypair.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/nacl/crypto_sign/wrapper-keypair.cpp b/nacl/crypto_sign/wrapper-keypair.cpp
new file mode 100644
index 00000000..3687465d
--- /dev/null
+++ b/nacl/crypto_sign/wrapper-keypair.cpp
@@ -0,0 +1,12 @@
1#include <string>
2using std::string;
3#include "crypto_sign.h"
4
5string crypto_sign_keypair(string *sk_string)
6{
7 unsigned char pk[crypto_sign_PUBLICKEYBYTES];
8 unsigned char sk[crypto_sign_SECRETKEYBYTES];
9 crypto_sign_keypair(pk,sk);
10 *sk_string = string((char *) sk,sizeof sk);
11 return string((char *) pk,sizeof pk);
12}