Prevector type
This commit is contained in:
committed by
Jack Grigg
parent
690d38f0f8
commit
29a8ade782
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "crypto/ripemd160.h"
|
||||
#include "crypto/sha256.h"
|
||||
#include "prevector.h"
|
||||
#include "serialize.h"
|
||||
#include "uint256.h"
|
||||
#include "version.h"
|
||||
@@ -120,6 +121,13 @@ inline uint160 Hash160(const std::vector<unsigned char>& vch)
|
||||
return Hash160(vch.begin(), vch.end());
|
||||
}
|
||||
|
||||
/** Compute the 160-bit hash of a vector. */
|
||||
template<unsigned int N>
|
||||
inline uint160 Hash160(const prevector<N, unsigned char>& vch)
|
||||
{
|
||||
return Hash160(vch.begin(), vch.end());
|
||||
}
|
||||
|
||||
/** A writer stream (for serialization) that computes a 256-bit hash. */
|
||||
class CHashWriter
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user