diff options
Diffstat (limited to 'contrib/syslinux-4.02/gpxe/src/crypto/axtls_sha1.c')
-rw-r--r-- | contrib/syslinux-4.02/gpxe/src/crypto/axtls_sha1.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/contrib/syslinux-4.02/gpxe/src/crypto/axtls_sha1.c b/contrib/syslinux-4.02/gpxe/src/crypto/axtls_sha1.c new file mode 100644 index 0000000..841e193 --- /dev/null +++ b/contrib/syslinux-4.02/gpxe/src/crypto/axtls_sha1.c @@ -0,0 +1,25 @@ +#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 ) { + SHA1Update ( ctx, data, len ); +} + +static void sha1_final ( void *ctx, void *out ) { + SHA1Final ( ctx, out ); +} + +struct digest_algorithm sha1_algorithm = { + .name = "sha1", + .ctxsize = SHA1_CTX_SIZE, + .blocksize = 64, + .digestsize = SHA1_DIGEST_SIZE, + .init = sha1_init, + .update = sha1_update, + .final = sha1_final, +}; |