#include #include #include #include #include // https://github.com/tkislan/base64 #include "base64.h" using namespace std; int main () { vector pk; pk.resize (crypto_sign_PUBLICKEYBYTES); vector sk; sk.resize (crypto_sign_SECRETKEYBYTES); crypto_sign_keypair (pk.data (), sk.data ()); const string pk_s ((const char *)pk.data (), pk.size ()); string pk_b64; Base64::Encode (pk_s, &pk_b64); cerr << "Generated secret key with pub key " << pk_b64 << endl; cerr << "Done." << endl; return 0; }