gomcaptcha/mcaptcha-pow-ffi/mcaptcha_pow_ffi.h

13 lines
412 B
C

#include <stdbool.h>
struct ProofOfWork {
unsigned long int nonce;
char *result;
};
bool is_valid_proof(unsigned long int nonce, char *result, char *phrase,
char *salt);
bool is_sufficient_difficulty(unsigned long int nonce, char *result, char *salt,
unsigned difficulty);
struct ProofOfWork prove_work(char *salt, char *phrase, unsigned difficulty);