Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
revoxhere
GitHub Repository: revoxhere/duino-coin
Path: blob/master/Arduino_Code/duco_hash.h
925 views
1
#pragma once
2
3
#include <Arduino.h>
4
5
#define SHA1_BLOCK_LEN 64
6
#define SHA1_HASH_LEN 20
7
8
struct duco_hash_state_t {
9
uint8_t buffer[SHA1_BLOCK_LEN];
10
uint8_t result[SHA1_HASH_LEN];
11
uint32_t tempState[5];
12
13
uint8_t block_offset;
14
uint8_t total_bytes;
15
};
16
17
void duco_hash_init(duco_hash_state_t * hasher, char const * prevHash);
18
19
uint8_t const * duco_hash_try_nonce(duco_hash_state_t * hasher, char const * nonce);
20
21