1
0
Fork 0
mirror of https://github.com/eosswedenorg/libantelope synced 2026-06-17 20:10:03 +02:00

WIF: Support PUB_K1 format.

This commit is contained in:
Henrik Hautakoski 2023-03-23 19:15:25 +01:00
parent 9114c17315
commit ebb4219024
4 changed files with 101 additions and 25 deletions

View file

@ -50,17 +50,17 @@ bool wif_priv_decode(ec_privkey_t& priv, const std::string& data);
/**
* Encode an EC public key to WIF String.
*/
std::string wif_pub_encode(const ec_pubkey_t& pub, const std::string& prefix = "EOS");
std::string wif_pub_encode(const ec_pubkey_t& pub, const std::string& prefix = WIF_PUB_LEG);
/**
* Decode an WIF String to EC public key
*/
bool wif_pub_decode(ec_pubkey_t& pub, const std::string& data, size_t prefix_length = 3);
bool wif_pub_decode(ec_pubkey_t& pub, const std::string& data);
/**
* Prints an EC keypair in WIF format to standard out.
*/
void wif_print_key(const struct ec_keypair *key, const std::string& prefix = "EOS");
void wif_print_key(const struct ec_keypair *key, const std::string& prefix = WIF_PUB_LEG);
/**
* Signatures