mirror of
https://github.com/eosswedenorg/libantelope
synced 2026-06-17 20:10:03 +02:00
include/libeosio/ec.hpp: Adding ecdsa_sign and ecdsa_verify()
This commit is contained in:
parent
73819444e5
commit
640f67a934
4 changed files with 310 additions and 0 deletions
|
|
@ -101,6 +101,22 @@ int ec_get_publickey(const ec_privkey_t *priv, ec_pubkey_t* pub);
|
|||
*/
|
||||
int ec_generate_key(struct ec_keypair *pair);
|
||||
|
||||
|
||||
/**
|
||||
* Sign
|
||||
*/
|
||||
|
||||
/**
|
||||
* Create a ECDSA signature, returns -1 if an error occured or zero on success.
|
||||
*/
|
||||
int ecdsa_sign(const ec_privkey_t& key, const sha256_t* digest, ec_signature_t& sig);
|
||||
|
||||
/**
|
||||
* Verify an ECDSA signature,
|
||||
* returns zero if the signature is correct. -1 if the signature is incorrect or an error occured.
|
||||
*/
|
||||
int ecdsa_verify(const sha256_t* digest, const ec_signature_t& sig, const ec_pubkey_t& key);
|
||||
|
||||
/**
|
||||
* Shutdown the ec library.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue