Displaying 1 result from an estimated 1 matches for "sivalu".
Did you mean:
sival
2020 Feb 09
2
[RFC PATCH] Add SHA1 support
...tx();
+ 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 (proper_seed_order) {
+ if (checksum_seed) {
+ SIVALu(seedbuf, 0, checksum_seed);
+ mdlib_update(mdctx, seedbuf, 4);
+ }
+ mdlib_update(mdctx, buf, len);
+ } else {
+ mdlib_update(mdctx, buf, len);
+ if (checksum_seed) {
+ SIVALu(seedbuf, 0, checksum_seed);
+ mdlib_update(mdctx, seedbuf, 4);
+ }
+ }
+ mdlib_finalize(mdctx, sum);
+ mdlib_fre...