aboutsummaryrefslogtreecommitdiff
path: root/src/hash.h
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2016-02-03 05:41:13 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2016-02-03 05:41:13 +0000
commita68bb9f5e7ef1da5c044907dc3a1d3d4a4dbc2cc (patch)
tree7e3932c75353499d6659b4f5a94b40e07e64c364 /src/hash.h
parent027fdb83b41ae9e9125cf61f6460c03ab34e5961 (diff)
parentfd13fe7ca01b6104ce591af2b90ee6951ccc5a16 (diff)
downloadbitcoin-a68bb9f5e7ef1da5c044907dc3a1d3d4a4dbc2cc.tar.xz
Merge branch 'master' into single_prodname
Diffstat (limited to 'src/hash.h')
-rw-r--r--src/hash.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/hash.h b/src/hash.h
index 0771555623..97955c8d5a 100644
--- a/src/hash.h
+++ b/src/hash.h
@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
-// Copyright (c) 2009-2013 The Bitcoin Core developers
+// Copyright (c) 2009-2015 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -8,6 +8,7 @@
#include "crypto/ripemd160.h"
#include "crypto/sha256.h"
+#include "prevector.h"
#include "serialize.h"
#include "uint256.h"
#include "version.h"
@@ -118,6 +119,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
{