You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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. };