void hefty_regenhash(struct work *work) { uint32_t result[8]; unsigned int data[20], datacopy[20]; // 32-aligned memcpy(datacopy, work->data, 80); flip80(data, datacopy); char *hdata = bin2hex((const unsigned char *)data, 80); applog(LOG_DEBUG, "Verifying hefty data %s", hdata); free(hdata); heavycoin_hash((const char*)data, 80, (char*)&result); memcpy(work->hash, &result, 32); }
void heavycoin_hashpow(const char* input, char* output) { heavycoin_hash(input, HEAVYCOIN_BLKHDR_SZ, output); }