mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
Cleanups.
This commit is contained in:
@@ -251,12 +251,7 @@ bool SHAMapTreeNode::updateHash()
|
||||
break;
|
||||
}
|
||||
if(!empty)
|
||||
{
|
||||
uint256 j[2];
|
||||
SHA512(reinterpret_cast<unsigned char *>(mHashes), sizeof(mHashes), (unsigned char *) j);
|
||||
nh=j[0];
|
||||
assert(!!nh);
|
||||
}
|
||||
nh=Serializer::getSHA512Half(reinterpret_cast<unsigned char *>(mHashes), sizeof(mHashes));
|
||||
}
|
||||
else if(mType==ACCOUNT_STATE)
|
||||
{
|
||||
|
||||
@@ -192,6 +192,13 @@ uint256 Serializer::getSHA512Half(const std::vector<unsigned char>& data, int si
|
||||
return j[0];
|
||||
}
|
||||
|
||||
uint256 Serializer::getSHA512Half(const unsigned char *data, int len)
|
||||
{
|
||||
uint256 j[2];
|
||||
SHA512(data, len, (unsigned char *) j);
|
||||
return j[0];
|
||||
}
|
||||
|
||||
bool Serializer::checkSignature(int pubkeyOffset, int signatureOffset) const
|
||||
{
|
||||
std::vector<unsigned char> pubkey, signature;
|
||||
|
||||
@@ -47,6 +47,7 @@ class Serializer
|
||||
uint256 getSHA256(int size=-1) const;
|
||||
uint256 getSHA512Half(int size=-1) const;
|
||||
static uint256 getSHA512Half(const std::vector<unsigned char>& data, int size=-1);
|
||||
static uint256 getSHA512Half(const unsigned char *data, int len);
|
||||
|
||||
// totality functions
|
||||
int getLength() const { return mData.size(); }
|
||||
|
||||
Reference in New Issue
Block a user