david/ipxe
Archived
1
0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src/crypto/axtls_sha1.c

26 lines
536 B
C
Raw Normal View History

2007-01-31 13:24:01 +01:00
#include "crypto/axtls/crypto.h"
#include <gpxe/crypto.h>
#include <gpxe/sha1.h>
static void sha1_init ( void *ctx ) {
SHA1Init ( ctx );
}
static void sha1_update ( void *ctx, const void *data, size_t len ) {
2007-01-31 13:24:01 +01:00
SHA1Update ( ctx, data, len );
}
static void sha1_final ( void *ctx, void *out ) {
SHA1Final ( ctx, out );
}
struct digest_algorithm sha1_algorithm = {
2007-01-31 13:24:01 +01:00
.name = "sha1",
.ctxsize = SHA1_CTX_SIZE,
2007-01-31 13:24:01 +01:00
.blocksize = 64,
.digestsize = SHA1_DIGEST_SIZE,
2007-01-31 13:24:01 +01:00
.init = sha1_init,
.update = sha1_update,
2007-01-31 13:24:01 +01:00
.final = sha1_final,
};