a.c

#include <stdio.h>
#include <string.h>
#include <openssl/sha.h>

1
int main(int argc, char *argv[]) 2 { 3 char data[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; 4 char hash_calc[32] = {0}; 5 SHA256_CTX c; 6 SHA256_Init(&c); 7 SHA256_Update(&c, (void *)data, 10); 8 SHA256_Final(hash_calc, &c); 9 10 11 return 0; 12 }

 

1 Makefile
2 
3 gcc -o a.out  a.c -lcrypto

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
  • 2021-12-26
  • 2021-07-02
  • 2022-03-10
猜你喜欢
  • 2022-01-10
  • 2021-07-22
  • 2021-05-19
  • 2021-11-01
  • 2022-02-11
  • 2021-09-13
  • 2022-01-12
相关资源
相似解决方案