您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

axtls_sha1.c 536B

12345678910111213141516171819202122232425
  1. #include "crypto/axtls/crypto.h"
  2. #include <gpxe/crypto.h>
  3. #include <gpxe/sha1.h>
  4. static void sha1_init ( void *ctx ) {
  5. SHA1Init ( ctx );
  6. }
  7. static void sha1_update ( void *ctx, const void *data, size_t len ) {
  8. SHA1Update ( ctx, data, len );
  9. }
  10. static void sha1_final ( void *ctx, void *out ) {
  11. SHA1Final ( ctx, out );
  12. }
  13. struct digest_algorithm sha1_algorithm = {
  14. .name = "sha1",
  15. .ctxsize = SHA1_CTX_SIZE,
  16. .blocksize = 64,
  17. .digestsize = SHA1_DIGEST_SIZE,
  18. .init = sha1_init,
  19. .update = sha1_update,
  20. .final = sha1_final,
  21. };