axtls_sha1.c
Go to the documentation of this file.00001 #include "crypto/axtls/crypto.h"
00002 #include <gpxe/crypto.h>
00003 #include <gpxe/sha1.h>
00004
00005 static void sha1_init ( void *ctx ) {
00006 SHA1Init ( ctx );
00007 }
00008
00009 static void sha1_update ( void *ctx, const void *data, size_t len ) {
00010 SHA1Update ( ctx, data, len );
00011 }
00012
00013 static void sha1_final ( void *ctx, void *out ) {
00014 SHA1Final ( ctx, out );
00015 }
00016
00017 struct digest_algorithm sha1_algorithm = {
00018 .name = "sha1",
00019 .ctxsize = SHA1_CTX_SIZE,
00020 .blocksize = 64,
00021 .digestsize = SHA1_DIGEST_SIZE,
00022 .init = sha1_init,
00023 .update = sha1_update,
00024 .final = sha1_final,
00025 };