mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-27 22:28:21 +00:00
c4805e0262
* issue/issue-281-create_binding_to_pedersen_hash * Add //nolint * Add more nolints * move nolint * Remove nolit * Add gcc install * Upd .ci * Remove staticcheck * Add envs * try to exclude pedersen_hash from test * try to fix mac os build * Add include for mac os * Add include for mac os * Fix runner_os * remove test for macos * Change restrictions * restrict tests to ubuntu * Try test windows * Add build constraint
32 lines
729 B
C++
32 lines
729 B
C++
#ifndef STARKWARE_CRYPTO_FFI_UTILS_H_
|
|
#define STARKWARE_CRYPTO_FFI_UTILS_H_
|
|
|
|
#include <cstddef>
|
|
|
|
#include "pedersen_hash.h"
|
|
|
|
#include "gsl-lite.hpp"
|
|
|
|
namespace starkware {
|
|
|
|
using ValueType = PrimeFieldElement::ValueType;
|
|
|
|
/*
|
|
Handles an error, and outputs a relevant error message as a C string to out.
|
|
*/
|
|
int HandleError(const char* msg, gsl::span<gsl::byte> out);
|
|
|
|
/*
|
|
Deserializes a BigInt (PrimeFieldElement::ValueType) from a byte span.
|
|
*/
|
|
ValueType Deserialize(const gsl::span<const gsl::byte> span);
|
|
|
|
/*
|
|
Serializes a BigInt (PrimeFieldElement::ValueType) to a byte span.
|
|
*/
|
|
void Serialize(const ValueType& val, const gsl::span<gsl::byte> span_out);
|
|
|
|
} // namespace starkware
|
|
|
|
#endif // STARKWARE_CRYPTO_FFI_UTILS_H_
|