-
-
Save csexton/4339346 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Compile with `gcc -Wall -lssl -lcrypto shait.c` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <openssl/sha.h> | |
int main(int argc,char **argv) | |
{ | |
SHA256_CTX context; | |
unsigned char md[SHA256_DIGEST_LENGTH]; | |
SHA256_Init(&context); | |
SHA256_Update(&context, "hello world", 11); | |
SHA256_Final(md, &context); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment