00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
#ifndef APR_SHA1_H
00023
#define APR_SHA1_H
00024
00025
#include "apu.h"
00026
#include "apr_general.h"
00027
00028
#ifdef __cplusplus
00029
extern "C" {
00030
#endif
00031
00038 #define APR_SHA1_DIGESTSIZE 20
00039
00044 #define APR_SHA1PW_ID "{SHA}"
00045
00047 #define APR_SHA1PW_IDLEN 5
00048
00050 typedef struct apr_sha1_ctx_t apr_sha1_ctx_t;
00051
00055 struct apr_sha1_ctx_t {
00057 apr_uint32_t
digest[5];
00059 apr_uint32_t
count_lo,
count_hi;
00061 apr_uint32_t
data[16];
00063 int local;
00064 };
00065
00081
APU_DECLARE(
void) apr_sha1_base64(const
char *clear,
int len,
char *out);
00082
00087 APU_DECLARE(
void) apr_sha1_init(apr_sha1_ctx_t *context);
00088
00095 APU_DECLARE(
void) apr_sha1_update(apr_sha1_ctx_t *context, const
char *input,
00096
unsigned int inputLen);
00097
00104 APU_DECLARE(
void) apr_sha1_update_binary(apr_sha1_ctx_t *context,
00105 const
unsigned char *input,
00106
unsigned int inputLen);
00107
00113 APU_DECLARE(
void) apr_sha1_final(
unsigned char digest[APR_SHA1_DIGESTSIZE],
00114 apr_sha1_ctx_t *context);
00115
00116 #ifdef __cplusplus
00117 }
00118 #endif
00119
00120 #endif