search for: seedbuf

Displaying 1 result from an estimated 1 matches for "seedbuf".

Did you mean: sectbuf
2020 Feb 09
2
[RFC PATCH] Add SHA1 support
..._LEN; default: /* paranoia to prevent missing case values */ exit_cleanup(RERR_UNSUPPORTED); } @@ -121,30 +128,48 @@ uint32 get_checksum1(char *buf1, int32 len) return (s1 & 0xffff) + (s2 << 16); } +static void get_checksum2_lib(void *buf, int32 len, void *sum) +{ + uchar seedbuf[4]; + MDLIB_MD_CTX *mdctx; + + mdctx = mdlib_new_ctx(); + if (!mdctx) + out_of_memory("get_checksum2"); + + if (xfersum_type == CSUM_MD5) + mdlib_init_md5(mdctx); + else if (xfersum_type == CSUM_SHA1) + mdlib_init_sha1(mdctx); + else + out_of_memory("wrong checksum"); + + if...