aboutsummaryrefslogtreecommitdiffstats
path: root/libdevcore/SHA3.h
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-11-15 04:35:24 +0800
committerchriseth <c@ethdev.com>2016-11-15 06:14:10 +0800
commit8944b092f8de074ec2c98434cb4c76d804146bd6 (patch)
tree8b0fb073bbecbfee1ace5e8169cd28daeb367da8 /libdevcore/SHA3.h
parent2f83a4557729753d6da28eddd28d54bfc18bf5e1 (diff)
downloaddexon-solidity-8944b092f8de074ec2c98434cb4c76d804146bd6.tar.gz
dexon-solidity-8944b092f8de074ec2c98434cb4c76d804146bd6.tar.zst
dexon-solidity-8944b092f8de074ec2c98434cb4c76d804146bd6.zip
Multi-level swarm hash.
Diffstat (limited to 'libdevcore/SHA3.h')
-rw-r--r--libdevcore/SHA3.h9
1 files changed, 1 insertions, 8 deletions
diff --git a/libdevcore/SHA3.h b/libdevcore/SHA3.h
index e3ff1335..ea0c761d 100644
--- a/libdevcore/SHA3.h
+++ b/libdevcore/SHA3.h
@@ -53,12 +53,5 @@ inline std::string keccak256(std::string const& _input, bool _isNibbles) { retur
/// Calculate SHA3-256 MAC
inline void keccak256mac(bytesConstRef _secret, bytesConstRef _plain, bytesRef _output) { keccak256(_secret.toBytes() + _plain.toBytes()).ref().populate(_output); }
-h256 swarmHash(bytes const& _data)
-{
- bytes size(8);
- for (size_t i = 0; i < 8; ++i)
- size[i] = (_data.size() >> (8 * i)) & 0xff;
-
- return keccak256(size + _data);
-}
+h256 swarmHash(bytes const& _data);
}