veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
hashutil.hpp
1
// Copyright (c) 2019-2022 Xenios SEZC
2
// https://www.veriblock.org
3
// Distributed under the MIT software license, see the accompanying
4
// file LICENSE or http://www.opensource.org/licenses/mit-license.php.
5
6
#ifndef ALT_INTEGRATION_VERIBLOCK_SHAUTIL_HPP
7
#define ALT_INTEGRATION_VERIBLOCK_SHAUTIL_HPP
8
9
#include <cstddef>
10
#include <cstdint>
11
12
#include "crypto/vblake.hpp"
13
#include "slice.hpp"
14
#include "third_party/sha256.hpp"
15
#include "uint.hpp"
16
17
namespace
altintegration
{
18
template
<
class
ElementType>
19
struct
Slice;
20
26
uint256
sha256
(
Slice<const uint8_t>
data);
28
uint256
sha256
(
Slice<const uint8_t>
a,
Slice<const uint8_t>
b);
29
35
uint256
sha256twice
(
Slice<const uint8_t>
data);
37
uint256
sha256twice
(
Slice<const uint8_t>
a,
Slice<const uint8_t>
b);
38
44
uint192
vblake
(
Slice<const uint8_t>
data);
45
46
}
// namespace altintegration
47
48
#endif
//__SHAUTIL__HPP__
altintegration
Defines logging helpers.
Definition:
block.hpp:14
altintegration::sha256twice
uint256 sha256twice(Slice< const uint8_t > data)
Calculates SHA256 of the input data twice.
altintegration::sha256
uint256 sha256(Slice< const uint8_t > data)
Calculates SHA256 of the input data.
altintegration::vblake
int vblake(void *out, const void *in, size_t inlen)
Convenience function for all-in-one computation.
altintegration::Blob< SHA256_HASH_SIZE >
altintegration::Slice
Non-owning contiguous array.
Definition:
slice.hpp:22