14 #include <openssl/ripemd.h>
30 #define CF_DIGEST_KEY_SZ RIPEMD160_DIGEST_LENGTH
41 RIPEMD160((
const unsigned char *) data, len, (
unsigned char *) d->
digest);
52 cf_digest_compute2(
const void *data1,
size_t len1,
const void *data2,
size_t len2,
cf_digest *d)
55 RIPEMD160((
const unsigned char *) data2, len2, (
unsigned char *) d->
digest);
60 RIPEMD160_Update(&c, data1, len1);
61 RIPEMD160_Update(&c, data2, len2);
62 RIPEMD160_Final( (
unsigned char *)(d->
digest), &c);
70 static inline cl_partition_id
71 cl_partition_getid(uint32_t n_partitions,
const cf_digest *d)
73 uint16_t *d_int = (uint16_t *)&d->
digest[0];
74 cl_partition_id r = *d_int & (n_partitions - 1);