wrapper-keypair.cpp 325 B

123456789101112
  1. #include <string>
  2. using std::string;
  3. #include "crypto_sign.h"
  4. string crypto_sign_keypair(string *sk_string)
  5. {
  6. unsigned char pk[crypto_sign_PUBLICKEYBYTES];
  7. unsigned char sk[crypto_sign_SECRETKEYBYTES];
  8. crypto_sign_keypair(pk,sk);
  9. *sk_string = string((char *) sk,sizeof sk);
  10. return string((char *) pk,sizeof pk);
  11. }