iPXE
md5.h File Reference

MD5 algorithm. More...

#include <stdint.h>
#include <ipxe/crypto.h>

Go to the source code of this file.

Data Structures

struct  md5_digest
 An MD5 digest. More...
union  md5_block
 An MD5 data block. More...
struct  md5_digest_data
 MD5 digest and data block. More...
union  md5_digest_data_dwords
 MD5 digest and data block. More...
struct  md5_context
 An MD5 context. More...

Macros

#define MD5_CTX_SIZE   sizeof ( struct md5_context )
 MD5 context size.
#define MD5_BLOCK_SIZE   sizeof ( union md5_block )
 MD5 block size.
#define MD5_DIGEST_SIZE   sizeof ( struct md5_digest )
 MD5 digest size.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 FILE_SECBOOT (PERMITTED)

Variables

struct digest_algorithm md5_algorithm
 MD5 algorithm.

Detailed Description

MD5 algorithm.

Definition in file md5.h.

Macro Definition Documentation

◆ MD5_CTX_SIZE

#define MD5_CTX_SIZE   sizeof ( struct md5_context )

MD5 context size.

Definition at line 67 of file md5.h.

Referenced by ntlm_key(), ntlm_response(), and tkip_kie_mic().

◆ MD5_BLOCK_SIZE

#define MD5_BLOCK_SIZE   sizeof ( union md5_block )

MD5 block size.

Definition at line 70 of file md5.h.

Referenced by ntlm_key(), ntlm_response(), and tkip_kie_mic().

◆ MD5_DIGEST_SIZE

#define MD5_DIGEST_SIZE   sizeof ( struct md5_digest )

MD5 digest size.

Definition at line 73 of file md5.h.

Referenced by eap_rx_md5(), http_digest_authenticate(), and http_digest_final().

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

Variable Documentation

◆ md5_algorithm

struct digest_algorithm md5_algorithm
extern

MD5 algorithm.

Definition at line 287 of file md5.c.

287 {
288 .name = "md5",
289 .ctxsize = sizeof ( struct md5_context ),
290 .blocksize = sizeof ( union md5_block ),
291 .digestsize = sizeof ( struct md5_digest ),
292 .init = md5_init,
293 .update = md5_update,
294 .final = md5_final,
295};
static void md5_final(void *ctx, void *out)
Generate MD5 digest.
Definition md5.c:261
static void md5_update(void *ctx, const void *data, size_t len)
Accumulate data with MD5 algorithm.
Definition md5.c:238
static void md5_init(void *ctx)
Initialise MD5 algorithm.
Definition md5.c:148
uint32_t digestsize
Digest size (i.e.
Definition pccrr.h:1
An MD5 context.
Definition md5.h:59
An MD5 digest.
Definition md5.h:17
An MD5 data block.
Definition md5.h:23

Referenced by dbg_md5_da(), DIGEST_TEST(), DIGEST_TEST(), DIGEST_TEST(), eap_rx_md5(), HMAC_TEST(), http_digest_final(), http_digest_init(), http_digest_update(), iscsi_handle_chap_i_value(), iscsi_handle_chap_r_value(), md5_sha1_final(), md5_sha1_init(), md5_sha1_update(), md5_test_exec(), md5sum_exec(), ntlm_key(), ntlm_response(), PUBKEY_SIGN_TEST(), tkip_kie_mic(), and tls_prf().