// SPDX-FileCopyrightText: 2024 Aravinth Manivannan // // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT #include 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);