Apache HTTPD
Classes | Macros | Typedefs | Functions | Variables
MD5 Routines

Classes

struct  apr_md5_ctx_t
 

Macros

#define APR_MD5_DIGESTSIZE   16
 

Typedefs

typedef struct apr_md5_ctx_t apr_md5_ctx_t
 

Functions

 APU_DECLARE (apr_status_t) apr_md5_init(apr_md5_ctx_t *context)
 

Variables

apr_xlate_txlate
 
const void * input
 
const void apr_size_t inputLen
 
apr_md5_ctx_tcontext
 
const charsalt
 
const char charresult
 
const char char apr_size_t nbytes
 
unsigned int count
 
unsigned int const unsigned char apr_size_t salt_len
 
unsigned int const unsigned char apr_size_t charout
 
unsigned int const unsigned char apr_size_t char apr_size_t out_len
 
const charhash
 

Detailed Description

Macro Definition Documentation

◆ APR_MD5_DIGESTSIZE

#define APR_MD5_DIGESTSIZE   16

The MD5 digest size

Definition at line 68 of file apr_md5.h.

Typedef Documentation

◆ apr_md5_ctx_t

See also
apr_md5_ctx_t

Definition at line 71 of file apr_md5.h.

Function Documentation

◆ APU_DECLARE()

APU_DECLARE ( apr_status_t  )

MD5 Initialize. Begins an MD5 operation, writing a new context.

Parameters
contextThe MD5 context to initialize.

MD5 translation setup. Provides the APR translation handle to be used for translating the content before calculating the digest.

Parameters
contextThe MD5 content to set the translation for.
xlateThe translation handle to use for this MD5 context

MD5 block update operation. Continue an MD5 message-digest operation, processing another message block, and updating the context.

Parameters
contextThe MD5 content to update.
inputnext message block to update
inputLenThe length of the next message block

MD5 finalization. Ends an MD5 message-digest operation, writing the message digest and zeroing the context

Parameters
digestThe final MD5 digest
contextThe MD5 content we are finalizing.

MD5 in one step

Parameters
digestThe final MD5 digest
inputThe message block to use
inputLenThe length of the message block

Encode a password using an MD5 algorithm

Parameters
passwordThe password to encode
saltThe salt string to use for the encoding
resultThe string to store the encoded password in
nbytesThe size of the result buffer

Encode a password using the bcrypt algorithm

Parameters
passwordThe password to encode
countThe cost of the encoding, possible values are 4 to 31
saltPointer to binary data to be used as salt for the encoding
salt_lenThe size of the salt data (must be >= 16)
outThe string to store the encoded password in
out_lenThe size of the result buffer (must be >= 61)

Validate hashes created by APR-supported algorithms: md5, bcrypt, and sha1. hashes created by crypt are supported only on platforms that provide crypt(3), so don't rely on that function unless you know that your application will be run only on platforms that support it. On platforms that don't support crypt(3), this falls back to a clear text string comparison.

Parameters
passwdThe password to validate
hashThe password to validate against

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".

< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".

< Replace

< Insert with duplicates

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< mask to extract lock type

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".

< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".

< Size of the file

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".

Definition at line 358 of file apr_brigade.c.

Variable Documentation

◆ context

apr_md5_ctx_t* context

Definition at line 120 of file apr_md5.h.

◆ count

unsigned int count

Definition at line 152 of file apr_md5.h.

◆ hash

const char* hash

Definition at line 168 of file apr_md5.h.

◆ input

const void * input

Definition at line 110 of file apr_md5.h.

◆ inputLen

const void apr_size_t inputLen

Definition at line 111 of file apr_md5.h.

◆ nbytes

Definition at line 140 of file apr_md5.h.

◆ out

Definition at line 155 of file apr_md5.h.

◆ out_len

Definition at line 155 of file apr_md5.h.

◆ result

const char char* result

Definition at line 140 of file apr_md5.h.

◆ salt

Definition at line 139 of file apr_md5.h.

◆ salt_len

Definition at line 154 of file apr_md5.h.

◆ xlate

apr_xlate_t* xlate

Definition at line 100 of file apr_md5.h.