zsync icon indicating copy to clipboard operation
zsync copied to clipboard

is it possible to replace sha1.c by openssl

Open wendal opened this issue 6 years ago • 1 comments

https://github.com/openssl/openssl/blob/6f0ac0e2f27d9240516edb9a23b7863e7ad02898/include/openssl/sha.h

wendal avatar Aug 16 '17 14:08 wendal

< #include <openssl/sha.h>
52c51
< SHA_CTX shactx;
---
> SHA1_CTX shactx;
293c292
<                 SHA1_Update(&shactx, outbuf, blocksize - zs.avail_out);
---
>                 SHA1Update(&shactx, outbuf, blocksize - zs.avail_out);
367c366
<             SHA1_Update(&shactx, buf, got);
---
>             SHA1Update(&shactx, buf, got);
718c717
<     SHA1_Init(&shactx);
---
>     SHA1Init(&shactx);
873c880
<         SHA1_Final(digest, &shactx);
---
>         SHA1Final(digest, &shactx);

and link with -lssl -lcrypto

wendal avatar Aug 16 '17 15:08 wendal