Documentation

Documentation

Includes

Macros

Marco APR_SHA1_H

#define APR_SHA1_H


      

Marco APR_SHA1_DIGESTSIZE

#define APR_SHA1_DIGESTSIZE 20
/** size of the SHA1 DIGEST */

Marco APR_SHA1PW_ID

#define APR_SHA1PW_ID "{SHA}"
/**
 * Define the Magic String prefix that identifies a password as being
 * hashed using our algorithm.
 */

Marco APR_SHA1PW_IDLEN

#define APR_SHA1PW_IDLEN 5
/** length of the SHA Password */

Functions

Func apr_sha1_init

void apr_sha1_init(apr_sha1_ctx_t *context);
/**
 * Initialize the SHA digest
 * @param context The SHA context to initialize
 */

Func apr_sha1_update

void apr_sha1_update(apr_sha1_ctx_t *context, const char *input,
                               unsigned int inputLen);
/**
 * Update the SHA digest
 * @param context The SHA1 context to update
 * @param input The buffer to add to the SHA digest
 * @param inputLen The length of the input buffer
 */

Func apr_sha1_update_binary

void apr_sha1_update_binary(apr_sha1_ctx_t *context,
                                      const unsigned char *input,
                                      unsigned int inputLen);
/**
 * Update the SHA digest with binary data
 * @param context The SHA1 context to update
 * @param input The buffer to add to the SHA digest
 * @param inputLen The length of the input buffer
 */

Func apr_sha1_final

void apr_sha1_final(unsigned char digest[APR_SHA1_DIGESTSIZE],
                              apr_sha1_ctx_t *context);
/**
 * Finish computing the SHA digest
 * @param digest the output buffer in which to store the digest
 * @param context The context to finalize
 */

Func HMAC_SHA1

void HMAC_SHA1(unsigned char hmac[20], const unsigned char *key, int key_len,
              const unsigned char *message, int message_len);
//calculate HMAC_SHA1

Vars

Consts

Types

Typedefs

Typedef apr_sha1_ctx_t

typedef struct apr_sha1_ctx_t apr_sha1_ctx_t;
/** @see apr_sha1_ctx_t */