mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 23:07:59 +01:00
Merge #20169: Taproot follow-up: Make ComputeEntrySchnorr and ComputeEntryECDSA const to clarify contract
51365674e8
script: Make ComputeEntrySchnorr and ComputeEntryECDSA const to clarify contract (practicalswift) Pull request description: Make `ComputeEntrySchnorr` and `ComputeEntryECDSA` `const` to clarify contract. ACKs for top commit: benthecarman: ACK51365674e8
theStack: ACK51365674e8
👌 sipa: utACK51365674e8
Tree-SHA512: 0f7a72bf6df7a97d21045ead9db398d2a9527c358aeeb894dec34a5386da4cc316e2f3326716e960ef8aa47bf73b99d1f92bb6d45dfa7871c84624bcad8a79f1
This commit is contained in:
commit
5d644778da
1 changed files with 2 additions and 2 deletions
|
@ -46,14 +46,14 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ComputeEntryECDSA(uint256& entry, const uint256 &hash, const std::vector<unsigned char>& vchSig, const CPubKey& pubkey)
|
ComputeEntryECDSA(uint256& entry, const uint256 &hash, const std::vector<unsigned char>& vchSig, const CPubKey& pubkey) const
|
||||||
{
|
{
|
||||||
CSHA256 hasher = m_salted_hasher_ecdsa;
|
CSHA256 hasher = m_salted_hasher_ecdsa;
|
||||||
hasher.Write(hash.begin(), 32).Write(&pubkey[0], pubkey.size()).Write(&vchSig[0], vchSig.size()).Finalize(entry.begin());
|
hasher.Write(hash.begin(), 32).Write(&pubkey[0], pubkey.size()).Write(&vchSig[0], vchSig.size()).Finalize(entry.begin());
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ComputeEntrySchnorr(uint256& entry, const uint256 &hash, Span<const unsigned char> sig, const XOnlyPubKey& pubkey)
|
ComputeEntrySchnorr(uint256& entry, const uint256 &hash, Span<const unsigned char> sig, const XOnlyPubKey& pubkey) const
|
||||||
{
|
{
|
||||||
CSHA256 hasher = m_salted_hasher_schnorr;
|
CSHA256 hasher = m_salted_hasher_schnorr;
|
||||||
hasher.Write(hash.begin(), 32).Write(&pubkey[0], pubkey.size()).Write(sig.data(), sig.size()).Finalize(entry.begin());
|
hasher.Write(hash.begin(), 32).Write(&pubkey[0], pubkey.size()).Write(sig.data(), sig.size()).Finalize(entry.begin());
|
||||||
|
|
Loading…
Add table
Reference in a new issue