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