mirror of
https://github.com/eosswedenorg/libantelope
synced 2026-06-17 03:50:04 +02:00
include/libeosio/WIF.hpp: Pass ec_privkey_t and ec_pubkey_t as const reference.
This commit is contained in:
parent
45c1f2909d
commit
77c93edc13
2 changed files with 4 additions and 4 deletions
|
|
@ -31,7 +31,7 @@ namespace libeosio {
|
|||
|
||||
#define PRIV_KEY_PREFIX 0x80 /* 0x80 for "Bitcoin mainnet". Always used by EOS. */
|
||||
|
||||
std::string wif_priv_encode(ec_privkey_t priv) {
|
||||
std::string wif_priv_encode(const ec_privkey_t& priv) {
|
||||
|
||||
checksum_t check;
|
||||
// 1 byte extra for prefix.
|
||||
|
|
@ -46,7 +46,7 @@ std::string wif_priv_encode(ec_privkey_t priv) {
|
|||
return base58_encode(buf, buf + sizeof(buf));
|
||||
}
|
||||
|
||||
std::string wif_pub_encode(ec_pubkey_t pub, const std::string& prefix) {
|
||||
std::string wif_pub_encode(const ec_pubkey_t& pub, const std::string& prefix) {
|
||||
|
||||
checksum_t check = checksum_ripemd160(pub.data(), pub.size());
|
||||
unsigned char buf[EC_PUBKEY_SIZE + CHECKSUM_SIZE];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue