aboutsummaryrefslogtreecommitdiff
path: root/src/key.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2020-06-18 16:32:32 -0700
committerPieter Wuille <pieter@wuille.net>2020-07-30 13:57:53 -0700
commite549bf8a9afae42fcda805e216a1cde62df195a6 (patch)
tree2d00e10ead84a3162f7ddc74300dcfbd340853a4 /src/key.cpp
parent2a2182c387f607cd8284f33890bd285a81077b7f (diff)
downloadbitcoin-e549bf8a9afae42fcda805e216a1cde62df195a6.tar.xz
Make CHash256 and CHash160 consume Spans
Diffstat (limited to 'src/key.cpp')
-rw-r--r--src/key.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/key.cpp b/src/key.cpp
index 7eecc6e083..6b504558e1 100644
--- a/src/key.cpp
+++ b/src/key.cpp
@@ -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);