mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Make CHash256 and CHash160 consume Spans
This commit is contained in:
parent
2a2182c387
commit
e549bf8a9a
16 changed files with 32 additions and 32 deletions
|
|
@ -237,7 +237,7 @@ bool CKey::VerifyPubKey(const CPubKey& pubkey) const {
|
|||
std::string str = "Bitcoin key verification\n";
|
||||
GetRandBytes(rnd, sizeof(rnd));
|
||||
uint256 hash;
|
||||
CHash256().Write((unsigned char*)str.data(), str.size()).Write(rnd, sizeof(rnd)).Finalize(hash.begin());
|
||||
CHash256().Write(MakeUCharSpan(str)).Write(rnd).Finalize(hash.begin());
|
||||
std::vector<unsigned char> vchSig;
|
||||
Sign(hash, vchSig);
|
||||
return pubkey.Verify(hash, vchSig);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue