VLC 4.0.0-dev
|
APIs to hash data using the Message-Digest Algorithm 5 (MD5) More...
Data Structures | |
struct | vlc_hash_md5_ctx |
MD5 hash context. More... | |
Macros | |
#define | VLC_HASH_MD5_DIGEST_SIZE 16 |
MD5 digest output size. | |
#define | VLC_HASH_MD5_DIGEST_HEX_SIZE 33 |
MD5 digest hex representation size. | |
Typedefs | |
typedef struct vlc_hash_md5_ctx | vlc_hash_md5_t |
MD5 hash context. | |
Functions | |
void | vlc_hash_md5_Init (vlc_hash_md5_t *ctx) |
Initialize MD5 context. | |
void | vlc_hash_md5_Update (vlc_hash_md5_t *ctx, const void *data, size_t size) |
Update MD5 hash computation with new data. | |
void | vlc_hash_md5_Finish (vlc_hash_md5_t *ctx, void *output, size_t size) |
Finish MD5 hash computation. | |
APIs to hash data using the Message-Digest Algorithm 5 (MD5)
#define VLC_HASH_MD5_DIGEST_HEX_SIZE 33 |
MD5 digest hex representation size.
#define VLC_HASH_MD5_DIGEST_SIZE 16 |
MD5 digest output size.
typedef struct vlc_hash_md5_ctx vlc_hash_md5_t |
MD5 hash context.
void vlc_hash_md5_Finish | ( | vlc_hash_md5_t * | ctx, |
void * | output, | ||
size_t | size | ||
) |
Finish MD5 hash computation.
Finishes the MD5 hash computation and provides the hash for the concatenation of all provided data by previous calls to vlc_hash_md5_Update. The result is written to the buffer pointed to by output, which must be at least VLC_HASH_MD5_DIGEST_SIZE big.
[in,out] | ctx | MD5 hash context to finish |
[out] | output | Output buffer to write to |
size | Output buffer size |
References vlc_hash_md5_ctx::md5_s::buf, md5_final(), vlc_hash_md5_ctx::priv, and VLC_HASH_MD5_DIGEST_SIZE.
Referenced by vlc_rand_bytes().
void vlc_hash_md5_Init | ( | vlc_hash_md5_t * | ctx | ) |
Initialize MD5 context.
Initializes the given MD5 hash function context, if the context is already initialized, it is reset.
[out] | ctx | MD5 hash context to init |
References md5_init(), and vlc_hash_md5_ctx::priv.
Referenced by ArtCacheGetDirPath(), AuthDigest(), GenerateCnonce(), InputSourceNew(), and vlc_rand_bytes().
void vlc_hash_md5_Update | ( | vlc_hash_md5_t * | ctx, |
const void * | data, | ||
size_t | size | ||
) |
Update MD5 hash computation with new data.
Updates the context with provided data which is used for the hash calculation. Can be called repeatedly with new data. The final hash represents the hash for the concatenation of all data.
[in,out] | ctx | MD5 hash context to update |
data | Data to add | |
size | Size of the data to add |
References md5_write(), and vlc_hash_md5_ctx::priv.
Referenced by ArtCacheGetDirPath(), AuthDigest(), GenerateCnonce(), InputSourceNew(), and vlc_rand_bytes().