mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Scope the ECDSA constant sizes to CPubKey / CKey classes
This commit is contained in:
parent
1ce9f0a952
commit
63179d0283
4 changed files with 43 additions and 41 deletions
|
|
@ -252,8 +252,8 @@ void CExtPubKey::Encode(unsigned char code[BIP32_EXTKEY_SIZE]) const {
|
|||
code[5] = (nChild >> 24) & 0xFF; code[6] = (nChild >> 16) & 0xFF;
|
||||
code[7] = (nChild >> 8) & 0xFF; code[8] = (nChild >> 0) & 0xFF;
|
||||
memcpy(code+9, chaincode.begin(), 32);
|
||||
assert(pubkey.size() == COMPRESSED_PUBLIC_KEY_SIZE);
|
||||
memcpy(code+41, pubkey.begin(), COMPRESSED_PUBLIC_KEY_SIZE);
|
||||
assert(pubkey.size() == CPubKey::COMPRESSED_PUBLIC_KEY_SIZE);
|
||||
memcpy(code+41, pubkey.begin(), CPubKey::COMPRESSED_PUBLIC_KEY_SIZE);
|
||||
}
|
||||
|
||||
void CExtPubKey::Decode(const unsigned char code[BIP32_EXTKEY_SIZE]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue