diff options
author | Franklin Wei <me@fwei.tk> | 2018-06-12 22:39:53 -0400 |
---|---|---|
committer | Franklin Wei <me@fwei.tk> | 2018-06-12 22:39:53 -0400 |
commit | 96f1240471dd75638f2a53b769a4a63e5e083b7e (patch) | |
tree | 5aefcfaaf3596033dfca8df745ce4fabab823748 /crypto.c | |
parent | cae99b638f54748e52a10ca613c1758c9646e2d0 (diff) | |
download | csaa-96f1240471dd75638f2a53b769a4a63e5e083b7e.zip csaa-96f1240471dd75638f2a53b769a4a63e5e083b7e.tar.gz csaa-96f1240471dd75638f2a53b769a4a63e5e083b7e.tar.bz2 csaa-96f1240471dd75638f2a53b769a4a63e5e083b7e.tar.xz |
Various changes; also implement binary tree complement calculation
Diffstat (limited to 'crypto.c')
-rw-r--r-- | crypto.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -59,6 +59,12 @@ hash_t hash_xor(hash_t a, hash_t b) return a; } +void hash_zero(hash_t *h) +{ + for(int i = 0; i < 32; ++i) + h->hash[i] = 0; +} + /* NOTE: we fail to distinguish between intermediate and leaf * nodes, making a second-preimage attack possible */ /* order: 0: u is left, v is right, 1: u is right, v is left */ |