swarm.c (651B)
1 #include <stdint.h> 2 #include <stddef.h> 3 4 #include "keccak-tiny.h" 5 #include "swarm.h" 6 #include "keystore.h" 7 8 int keccak_hash_btc(unsigned char *out, size_t out_sz, const unsigned char *in, size_t in_sz) { 9 return keccak_hash((uint8_t*)out, out_sz, (uint8_t*)in, in_sz, SWARM_KECCAK_RATE, SWARM_KECCAK_PADDING); 10 } 11 12 //int keccak_hash_btc_v(unsigned char *out, size_t out_sz, const unsigned char *in, size_t in_sz, const unsigned char *vector, size_t *vector_sz, int vector_count) { 13 // int i; 14 // int sz; 15 // int *p; 16 // 17 // src = vector; 18 // p = out + SWARM_WORD_SIZE; 19 // for (i = 0; i < vector_count; i++) { 20 // sz = *(vector_sz +i ); 21 // memcpy 22 // } 23 //} 24 //