Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is it possible to replace sha1.c by openssl #1

Open
wendal opened this issue Aug 16, 2017 · 1 comment
Open

is it possible to replace sha1.c by openssl #1

wendal opened this issue Aug 16, 2017 · 1 comment

Comments

@wendal
Copy link

wendal commented Aug 16, 2017

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

@wendal
Copy link
Author

wendal commented Aug 16, 2017

< #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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant