aboutsummaryrefslogtreecommitdiff
path: root/src/key.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/key.cpp')
-rw-r--r--src/key.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/key.cpp b/src/key.cpp
index 33913ed461..3a3f0b2bc2 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -245,8 +245,7 @@ bool CKey::VerifyPubKey(const CPubKey& pubkey) const {
unsigned char rnd[8];
std::string str = "Bitcoin key verification\n";
GetRandBytes(rnd);
- uint256 hash;
- CHash256().Write(MakeUCharSpan(str)).Write(rnd).Finalize(hash);
+ uint256 hash{Hash(str, rnd)};
std::vector<unsigned char> vchSig;
Sign(hash, vchSig);
return pubkey.Verify(hash, vchSig);