veriblock-pop-cpp
C++11 Libraries for leveraging VeriBlock Proof-Of-Proof blockchain technology.
vblake.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_VBLAKE_H
7#define ALT_INTEGRATION_VERIBLOCK_VBLAKE_H
8
9#include <cstddef>
10#include <cstdint>
11
12#define VBLAKE_HASH_SIZE 24
13
14namespace altintegration {
18typedef struct {
19 uint8_t b[64];
20 uint64_t h[8];
22
27void vblake_init(vblake_ctx *ctx); // secret key
28
36int vblake_update(vblake_ctx *ctx, // context
37 const void *in,
38 size_t inlen); // data to be hashed
39
45void vblake_final(vblake_ctx *ctx, void *out);
46
54int vblake(void *out, // return buffer for digest
55 const void *in,
56 size_t inlen); // data to be hashed
57
58} // namespace altintegration
59
60#endif // ALT_INTEGRATION_VBLAKE_HPP
Defines logging helpers.
Definition: block.hpp:14
int vblake_update(vblake_ctx *ctx, const void *in, size_t inlen)
Add "inlen" bytes from "in" into the hash.
void vblake_final(vblake_ctx *ctx, void *out)
Generate the message digest.
int vblake(void *out, const void *in, size_t inlen)
Convenience function for all-in-one computation.
void vblake_init(vblake_ctx *ctx)
Initialize the hashing context.
vBlake hash state context.
Definition: vblake.hpp:18