Delete Verus junk, which breaks ARMv8/aarch64 builds
This commit is contained in:
91
src/hash.h
91
src/hash.h
@@ -1,5 +1,6 @@
|
||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||
// Copyright (c) 2009-2013 The Bitcoin Core developers
|
||||
// Copyright (c) 2019 The Hush developers
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -221,78 +222,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
/** A writer stream (for serialization) that computes a 256-bit Verus hash. */
|
||||
class CVerusHashWriter
|
||||
{
|
||||
private:
|
||||
CVerusHash state;
|
||||
|
||||
public:
|
||||
int nType;
|
||||
int nVersion;
|
||||
|
||||
CVerusHashWriter(int nTypeIn, int nVersionIn) : nType(nTypeIn), nVersion(nVersionIn), state() { }
|
||||
void Reset() { state.Reset(); }
|
||||
|
||||
CVerusHashWriter& write(const char *pch, size_t size) {
|
||||
state.Write((const unsigned char*)pch, size);
|
||||
return (*this);
|
||||
}
|
||||
|
||||
// invalidates the object for further writing
|
||||
uint256 GetHash() {
|
||||
uint256 result;
|
||||
state.Finalize((unsigned char*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
int64_t *xI64p() { return state.ExtraI64Ptr(); }
|
||||
CVerusHash &GetState() { return state; }
|
||||
|
||||
template<typename T>
|
||||
CVerusHashWriter& operator<<(const T& obj) {
|
||||
// Serialize to this stream
|
||||
::Serialize(*this, obj);
|
||||
return (*this);
|
||||
}
|
||||
};
|
||||
|
||||
/** A writer stream (for serialization) that computes a 256-bit Verus hash with key initialized to Haraka standard. */
|
||||
class CVerusHashV2Writer
|
||||
{
|
||||
private:
|
||||
CVerusHashV2 state;
|
||||
|
||||
public:
|
||||
int nType;
|
||||
int nVersion;
|
||||
|
||||
CVerusHashV2Writer(int nTypeIn, int nVersionIn) : nType(nTypeIn), nVersion(nVersionIn), state() {}
|
||||
void Reset() { state.Reset(); }
|
||||
|
||||
CVerusHashV2Writer& write(const char *pch, size_t size) {
|
||||
state.Write((const unsigned char*)pch, size);
|
||||
return (*this);
|
||||
}
|
||||
|
||||
// invalidates the object for further writing
|
||||
uint256 GetHash() {
|
||||
uint256 result;
|
||||
state.Finalize((unsigned char*)&result);
|
||||
return result;
|
||||
}
|
||||
|
||||
int64_t *xI64p() { return state.ExtraI64Ptr(); }
|
||||
CVerusHashV2 &GetState() { return state; }
|
||||
|
||||
template<typename T>
|
||||
CVerusHashV2Writer& operator<<(const T& obj) {
|
||||
// Serialize to this stream
|
||||
::Serialize(*this, obj);
|
||||
return (*this);
|
||||
}
|
||||
};
|
||||
|
||||
/** Compute the 256-bit hash of an object's serialization. */
|
||||
template<typename T>
|
||||
uint256 SerializeHash(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION)
|
||||
@@ -302,24 +231,6 @@ uint256 SerializeHash(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL
|
||||
return ss.GetHash();
|
||||
}
|
||||
|
||||
/** Compute the 256-bit Verus hash of an object's serialization. */
|
||||
template<typename T>
|
||||
uint256 SerializeVerusHash(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION)
|
||||
{
|
||||
CVerusHashWriter ss(nType, nVersion);
|
||||
ss << obj;
|
||||
return ss.GetHash();
|
||||
}
|
||||
|
||||
/** Compute the 256-bit Verus hash of an object's serialization. */
|
||||
template<typename T>
|
||||
uint256 SerializeVerusHashV2(const T& obj, int nType=SER_GETHASH, int nVersion=PROTOCOL_VERSION)
|
||||
{
|
||||
CVerusHashV2Writer ss(nType, nVersion);
|
||||
ss << obj;
|
||||
return ss.GetHash();
|
||||
}
|
||||
|
||||
unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char>& vDataToHash);
|
||||
|
||||
void BIP32Hash(const ChainCode &chainCode, unsigned int nChild, unsigned char header, const unsigned char data[32], unsigned char output[64]);
|
||||
|
||||
Reference in New Issue
Block a user