mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
26 lines
674 B
C
26 lines
674 B
C
#include <stdarg.h>
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
|
|
#define FIELD_SIZE 32
|
|
|
|
/**
|
|
* * # Safety * this functions accepts raw pointer from golang
|
|
*/
|
|
bool poseidon(uint8_t network_id,
|
|
const uint8_t *field_ptr,
|
|
uintptr_t field_len,
|
|
uint8_t *output_ptr);
|
|
|
|
/**
|
|
* * # Safety * this functions accepts raw pointer from golang
|
|
*/
|
|
bool verify(uint8_t network_id,
|
|
const uint8_t *pubkey_x,
|
|
const uint8_t *pubkey_y,
|
|
const uint8_t *sig_rx,
|
|
const uint8_t *sig_s,
|
|
const uint8_t *field_ptr,
|
|
uintptr_t field_len,
|
|
bool *output_ptr);
|