![]() |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
RAII Wrapper around OpenSSL's EC_KEY. More...
#include <ecwrapper.h>
Public Member Functions | |
| CECKey () | |
| ~CECKey () | |
| void | GetPubKey (std::vector< unsigned char > &pubkey, bool fCompressed) |
| bool | SetPubKey (const unsigned char *pubkey, size_t size) |
| bool | Verify (const uint256 &hash, const std::vector< unsigned char > &vchSig) |
| bool | Recover (const uint256 &hash, const unsigned char *p64, int rec) |
| reconstruct public key from a compact signature This is only slightly more CPU intensive than just verifying it. More... | |
| bool | TweakPublic (const unsigned char vchTweak[32]) |
Static Public Member Functions | |
| static bool | SanityCheck () |
Private Attributes | |
| EC_KEY * | pkey |
RAII Wrapper around OpenSSL's EC_KEY.
Definition at line 16 of file ecwrapper.h.
| CECKey::CECKey | ( | ) |
Definition at line 173 of file ecwrapper.cpp.
| CECKey::~CECKey | ( | ) |
Definition at line 179 of file ecwrapper.cpp.
| void CECKey::GetPubKey | ( | std::vector< unsigned char > & | pubkey, |
| bool | fCompressed | ||
| ) |
Definition at line 184 of file ecwrapper.cpp.
| bool CECKey::Recover | ( | const uint256 & | hash, |
| const unsigned char * | p64, | ||
| int | rec | ||
| ) |
reconstruct public key from a compact signature This is only slightly more CPU intensive than just verifying it.
If this function succeeds, the recovered public key is guaranteed to be valid (the signature is a valid signature of the given data for that key)
Definition at line 233 of file ecwrapper.cpp.
|
static |
Definition at line 282 of file ecwrapper.cpp.
| bool CECKey::SetPubKey | ( | const unsigned char * | pubkey, |
| size_t | size | ||
| ) |
Definition at line 197 of file ecwrapper.cpp.
| bool CECKey::TweakPublic | ( | const unsigned char | vchTweak[32] | ) |
Definition at line 257 of file ecwrapper.cpp.
| bool CECKey::Verify | ( | const uint256 & | hash, |
| const std::vector< unsigned char > & | vchSig | ||
| ) |
Definition at line 202 of file ecwrapper.cpp.
|
private |
Definition at line 19 of file ecwrapper.h.
1.8.17