![]() |
The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Structures and prototypes for our local MD5 implementation. More...
#include <freeradius-devel/build.h>#include <freeradius-devel/missing.h>#include <inttypes.h>#include <sys/types.h>#include <stdint.h>#include <stdbool.h>#include <string.h>
Include dependency graph for md5.h:Go to the source code of this file.
Data Structures | |
| struct | fr_md5_funcs_t |
Macros | |
| #define | fr_md5_ctx_alloc() fr_md5_funcs->alloc() |
| Allocation function for MD5 digest context. | |
| #define | fr_md5_ctx_copy(_dst, _src) fr_md5_funcs->copy(_dst, _src) |
| Copy the contents of a ctx. | |
| #define | fr_md5_ctx_free(_ctx) fr_md5_funcs->free(_ctx) |
| Free function for MD5 digest ctx. | |
| #define | fr_md5_ctx_reset(_ctx) fr_md5_funcs->reset(_ctx) |
| Reset the ctx to allow reuse. | |
| #define | fr_md5_final(_out, _ctx) fr_md5_funcs->final(_out, _ctx) |
| Finalise the ctx, producing the digest. | |
| #define | fr_md5_update(_ctx, _in, _inlen) fr_md5_funcs->update(_ctx, _in, _inlen) |
| Ingest plaintext into the digest. | |
| #define | MD5_DIGEST_LENGTH 16 |
Typedefs | |
| typedef fr_md5_ctx_t *(* | fr_md5_ctx_alloc_t) (void) |
| typedef void(* | fr_md5_ctx_copy_t) (fr_md5_ctx_t *dst, fr_md5_ctx_t const *src) |
| typedef void(* | fr_md5_ctx_free_t) (fr_md5_ctx_t **ctx) |
| typedef void(* | fr_md5_ctx_reset_t) (fr_md5_ctx_t *ctx) |
| typedef void | fr_md5_ctx_t |
| typedef void(* | fr_md5_final_t) (uint8_t out[static MD5_DIGEST_LENGTH], fr_md5_ctx_t *ctx) |
| typedef void(* | fr_md5_update_t) (fr_md5_ctx_t *ctx, uint8_t const *in, size_t inlen) |
Functions | |
| int | fr_hmac_md5 (uint8_t digest[static MD5_DIGEST_LENGTH], uint8_t const *in, size_t inlen, uint8_t const *key, size_t key_len) |
| void | fr_md5_calc (uint8_t out[static MD5_DIGEST_LENGTH], uint8_t const *in, size_t inlen) |
| Perform a single digest operation on a single input buffer. | |
| fr_md5_ctx_t * | fr_md5_ctx_alloc_from_list (void) |
| Allocate an MD5 context from a free list. | |
| void | fr_md5_ctx_free_from_list (fr_md5_ctx_t **ctx) |
| Release an MD5 context back to a free list. | |
Variables | |
| fr_md5_funcs_t const * | fr_md5_funcs |
| Swap a single pointer, so all functions get swapped as an atomic operation. | |
Structures and prototypes for our local MD5 implementation.
Structures and declarations for md5.
Definition in file md5.h.
| struct fr_md5_funcs_t |
| Data Fields | ||
|---|---|---|
| fr_md5_ctx_alloc_t | alloc | |
| fr_md5_ctx_copy_t | copy | |
| fr_md5_final_t | final | |
| fr_md5_ctx_free_t | free | |
| fr_md5_ctx_reset_t | reset | |
| fr_md5_update_t | update | |
| #define fr_md5_ctx_alloc | ( | ) | fr_md5_funcs->alloc() |
| #define fr_md5_ctx_copy | ( | _dst, | |
| _src | |||
| ) | fr_md5_funcs->copy(_dst, _src) |
| #define fr_md5_ctx_free | ( | _ctx | ) | fr_md5_funcs->free(_ctx) |
| #define fr_md5_ctx_reset | ( | _ctx | ) | fr_md5_funcs->reset(_ctx) |
| #define fr_md5_final | ( | _out, | |
| _ctx | |||
| ) | fr_md5_funcs->final(_out, _ctx) |
| #define fr_md5_update | ( | _ctx, | |
| _in, | |||
| _inlen | |||
| ) | fr_md5_funcs->update(_ctx, _in, _inlen) |
| typedef fr_md5_ctx_t *(* fr_md5_ctx_alloc_t) (void) |
| typedef void(* fr_md5_ctx_copy_t) (fr_md5_ctx_t *dst, fr_md5_ctx_t const *src) |
| typedef void(* fr_md5_ctx_free_t) (fr_md5_ctx_t **ctx) |
| typedef void(* fr_md5_ctx_reset_t) (fr_md5_ctx_t *ctx) |
| typedef void fr_md5_ctx_t |
| typedef void(* fr_md5_final_t) (uint8_t out[static MD5_DIGEST_LENGTH], fr_md5_ctx_t *ctx) |
| typedef void(* fr_md5_update_t) (fr_md5_ctx_t *ctx, uint8_t const *in, size_t inlen) |
| int fr_hmac_md5 | ( | uint8_t | digest[static MD5_DIGEST_LENGTH], |
| uint8_t const * | in, | ||
| size_t | inlen, | ||
| uint8_t const * | key, | ||
| size_t | key_len | ||
| ) |
Perform a single digest operation on a single input buffer.
Perform a single digest operation on a single input buffer.
| [out] | out | Where to write the MD5 digest. Must be a minimum of MD5_DIGEST_LENGTH. |
| [in] | in | Data to hash. |
| [in] | inlen | Length of the data. |
Definition at line 245 of file merged_model.c.
Here is the call graph for this function:
Here is the caller graph for this function:| fr_md5_ctx_t * fr_md5_ctx_alloc_from_list | ( | void | ) |
| void fr_md5_ctx_free_from_list | ( | fr_md5_ctx_t ** | ctx | ) |
|
extern |
1.9.8