From e549bf8a9afae42fcda805e216a1cde62df195a6 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Thu, 18 Jun 2020 16:32:32 -0700 Subject: Make CHash256 and CHash160 consume Spans --- src/key.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/key.cpp') diff --git a/src/key.cpp b/src/key.cpp index 7eecc6e08..6b504558e 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 vchSig; Sign(hash, vchSig); return pubkey.Verify(hash, vchSig); -- cgit v1.2.3