Equity
Bitcoin Protocol Library
Public Member Functions | Static Public Attributes | List of all members
Equity::PublicKey Class Reference

A Bitcoin public key. More...

#include <PublicKey.h>

Public Member Functions

 PublicKey (std::vector< uint8_t > const &k)
 
 PublicKey (uint8_t const *data, size_t size)
 
 PublicKey (PrivateKey const &k)
 
std::vector< uint8_t > value () const
 Returns the raw key bytes.
 
bool compressed () const
 Returns true if the public key is compressed.
 
bool valid () const
 Returns true if the key is valid.
 
std::string toHex () const
 Returns the key as a hex string.
 

Static Public Attributes

static size_t const COMPRESSED_SIZE = 33
 Size of a compressed public key.
 
static size_t const UNCOMPRESSED_SIZE = 65
 Size of an uncompressed public key.
 

Detailed Description

A Bitcoin public key.

Bitcoin public keys are assumed to be in the form specified by ANSI X9.62.

Constructor & Destructor Documentation

PublicKey::PublicKey ( std::vector< uint8_t > const &  k)
explicit
Parameters
kraw key bytes
PublicKey::PublicKey ( uint8_t const *  data,
size_t  size 
)
Parameters
dataraw key bytes
sizesize of the data
PublicKey::PublicKey ( PrivateKey const &  k)
explicit
Parameters
kprivate key

The documentation for this class was generated from the following files: