 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
49 memcpy(&out[1], &keyID, 20);
56 memcpy(&out[1], &scriptID, 20);
62 memcpy(&out[1], &pubkey[1], 32);
63 if (pubkey[0] == 0x02 || pubkey[0] == 0x03) {
66 }
else if (pubkey[0] == 0x04) {
67 out[0] = 0x04 | (pubkey[64] & 0x01);
76 if (nSize == 0 || nSize == 1)
78 if (nSize == 2 || nSize == 3 || nSize == 4 || nSize == 5)
112 unsigned char vch[33] = {};
114 memcpy(&vch[1], &in[0], 32);
115 CPubKey pubkey(&vch[0], &vch[33]);
118 assert(pubkey.
size() == 65);
142 while (((n % 10) == 0) && e < 9) {
148 assert(d >= 1 && d <= 9);
150 return 1 + (n * 9 + d - 1) * 10 + e;
152 return 1 + (n - 1) * 10 + 9;
bool IsToKeyID(CKeyID &hash) const
These check for scripts for which a special case with a shorter encoding is defined.
unsigned int GetSpecialSize(unsigned int nSize) const
bool IsToPubKey(CPubKey &pubkey) const
void Set(const T pbegin, const T pend)
Initialize a public key using begin/end iterators to byte data.
void * memcpy(void *a, const void *b, size_t c)
bool Decompress()
Turn this public key into an uncompressed public key.
static uint64_t CompressAmount(uint64_t nAmount)
A reference to a CKey: the Hash160 of its serialized public key.
const unsigned char * begin() const
bool IsToScriptID(CScriptID &hash) const
unsigned int size() const
Simple read-only vector-like interface to the pubkey data.
bool Compress(std::vector< unsigned char > &out) const
void resize(size_type new_size)
An encapsulated public key.
bool Decompress(unsigned int nSize, const std::vector< unsigned char > &out)
bool IsFullyValid() const
fully validate whether this is a valid public key (more expensive than IsValid())
A reference to a CScript: the Hash160 of its serialization (see script.h)
static uint64_t DecompressAmount(uint64_t nAmount)