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

include/libeosio/ec.hpp: adding ec_generate_privkey() and ec_get_publickey()

This commit is contained in:
Henrik Hautakoski 2023-03-19 21:44:41 +01:00
parent 4b8c1c7733
commit 171876bbfa
4 changed files with 214 additions and 0 deletions

View file

@ -62,6 +62,16 @@ struct ec_keypair {
*/
int ec_init();
/**
* Generates an new random private key using the secp256k1 curve.
*/
int ec_generate_privkey(ec_privkey_t *priv);
/**
* Get the public key from an private key.
*/
int ec_get_publickey(const ec_privkey_t *priv, ec_pubkey_t* pub);
/**
* Generates a keypair using the secp256k1 curve.
* public key is in compressed format.