Browse Source

Coding style "adjustment"

- Adjusting the coding style for consistency after the talk we had
cl-refactor
Lefteris Karapetsas 10 years ago
parent
commit
7fd1dd36f5
  1. 2
      internal.c
  2. 6
      sha3_cryptopp.cpp

2
internal.c

@ -76,6 +76,8 @@ bool static ethash_compute_cache_nodes(node *const nodes,
SHA3_512(nodes[i].bytes, data.bytes, sizeof(data));
}
}
// now perform endian conversion
fix_endian_arr32(nodes->words, num_nodes * NODE_WORDS);
return true;
}

6
sha3_cryptopp.cpp

@ -25,11 +25,13 @@
extern "C" {
struct ethash_h256;
typedef struct ethash_h256 ethash_h256_t;
void SHA3_256(ethash_h256_t const* ret, const uint8_t *data, size_t size) {
void SHA3_256(ethash_h256_t const* ret, const uint8_t *data, size_t size)
{
CryptoPP::SHA3_256().CalculateDigest((uint8_t*)ret, data, size);
}
void SHA3_512(uint8_t *const ret, const uint8_t *data, size_t size) {
void SHA3_512(uint8_t *const ret, const uint8_t *data, size_t size)
{
CryptoPP::SHA3_512().CalculateDigest(ret, data, size);
}
}

Loading…
Cancel
Save