mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-02-01 00:02:14 +00:00
34 lines
933 B
C
34 lines
933 B
C
#ifndef LIBRUSTZCASH_INCLUDE_H_
|
|
#define LIBRUSTZCASH_INCLUDE_H_
|
|
|
|
#include <stdint.h>
|
|
|
|
extern "C" {
|
|
uint64_t librustzcash_xor(uint64_t a, uint64_t b);
|
|
|
|
/// Writes the "uncommitted" note value for empty leaves
|
|
/// of the merkle tree. `result` must be a valid pointer
|
|
/// to 32 bytes which will be written.
|
|
void librustzcash_tree_uncommitted(
|
|
unsigned char *result
|
|
);
|
|
|
|
/// Computes a merkle tree hash for a given depth.
|
|
/// The `depth` parameter should not be larger than
|
|
/// 62.
|
|
///
|
|
/// `a` and `b` each must be of length 32, and must each
|
|
/// be scalars of BLS12-381.
|
|
///
|
|
/// The result of the merkle tree hash is placed in
|
|
/// `result`, which must also be of length 32.
|
|
void librustzcash_merkle_hash(
|
|
size_t depth,
|
|
const unsigned char *a,
|
|
const unsigned char *b,
|
|
unsigned char *result
|
|
);
|
|
}
|
|
|
|
#endif // LIBRUSTZCASH_INCLUDE_H_
|