Merge branch 'master' of /pub/scm/gpxe
[gpxe.git] / src / crypto / axtls_sha1.c
blob62ff878a098142c2c3f12e5ff5ccbe486d0ccd74
1 #include "crypto/axtls/crypto.h"
2 #include <gpxe/crypto.h>
3 #include <gpxe/sha1.h>
5 static void sha1_init ( void *ctx ) {
6 SHA1Init ( ctx );
9 static void sha1_update ( void *ctx, const void *data, void *dst __unused,
10 size_t len ) {
11 SHA1Update ( ctx, data, len );
14 static void sha1_final ( void *ctx, void *out ) {
15 SHA1Final ( ctx, out );
18 struct crypto_algorithm sha1_algorithm = {
19 .name = "sha1",
20 .ctxsize = SHA1_CTX_SIZE,
21 .blocksize = 64,
22 .digestsize = SHA1_DIGEST_SIZE,
23 .init = sha1_init,
24 .encode = sha1_update,
25 .final = sha1_final,