I would like to go from a private HEX key back into public keys. I'm not really a C coder, but here is my attempt. Is there a better way, perhaps a way that actually compiles? Or perhaps there is something already in the toolkit to do this.
EC_KEY* k= EC_KEY_new();
EC_GROUP *group = EC_GROUP_new_by_curve_name(NID_secp256k1);
fc::sha256 sec=new fc::sha256 sec("5b5ca05c294f6778f84f0f5ea01f017a0c7e10fcf7a3cba6e67ae0e6318b389d");
//int nbytes = BN_num_bytes(bn);
//BN_hex2bn( &((unsigned char*)&sec)[32-nbytes], bn);
std::cout << "bts address: "
<< std::string( bts::blockchain::address( k.get_public_key() ) ) <<"\n";
std::cout << "pts address: "
<< std::string( bts::blockchain::pts_address( k.get_public_key() ) ) <<"\n";