script: Make ComputeEntrySchnorr and ComputeEntryECDSA const to clarify contract
This commit is contained in:
1 parent
cbb5f3a2d5
commit
51365674e8
1 file changed
+2
-2
@@ -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());
|
||||||
|
|||||||
Reference in new issue
Block a user