| 369 | } |
| 370 | |
| 371 | CPubKey EllSwiftPubKey::Decode() const |
| 372 | { |
| 373 | secp256k1_pubkey pubkey; |
| 374 | secp256k1_ellswift_decode(secp256k1_context_static, &pubkey, UCharCast(m_pubkey.data())); |
| 375 | |
| 376 | size_t sz = CPubKey::COMPRESSED_SIZE; |
| 377 | std::array<uint8_t, CPubKey::COMPRESSED_SIZE> vch_bytes; |
| 378 | |
| 379 | secp256k1_ec_pubkey_serialize(secp256k1_context_static, vch_bytes.data(), &sz, &pubkey, SECP256K1_EC_COMPRESSED); |
| 380 | assert(sz == vch_bytes.size()); |
| 381 | |
| 382 | return CPubKey{vch_bytes.begin(), vch_bytes.end()}; |
| 383 | } |
| 384 | |
| 385 | void CExtPubKey::Encode(unsigned char code[BIP32_EXTKEY_SIZE]) const { |
| 386 | code[0] = nDepth; |
nothing calls this directly
no test coverage detected