Apache HTTPD
framework
httpd-2.4.62
srclib
apr-util
include
apr_sha1.h
Go to the documentation of this file.
1
/* Licensed to the Apache Software Foundation (ASF) under one or more
2
* contributor license agreements. See the NOTICE file distributed with
3
* this work for additional information regarding copyright ownership.
4
* The ASF licenses this file to You under the Apache License, Version 2.0
5
* (the "License"); you may not use this file except in compliance with
6
* the License. You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
/* NIST Secure Hash Algorithm
17
* heavily modified by Uwe Hollerbach
[email protected]
edu
18
* from Peter C. Gutmann's implementation as found in
19
* Applied Cryptography by Bruce Schneier
20
* This code is hereby placed in the public domain
21
*/
22
23
#ifndef APR_SHA1_H
24
#define APR_SHA1_H
25
26
#include "apu.h"
27
#include "
apr_general.h
"
28
29
#ifdef __cplusplus
30
extern
"C"
{
31
#endif
32
39
#define APR_SHA1_DIGESTSIZE 20
40
45
#define APR_SHA1PW_ID "{SHA}"
46
48
#define APR_SHA1PW_IDLEN 5
49
51
typedef
struct
apr_sha1_ctx_t
apr_sha1_ctx_t
;
52
56
struct
apr_sha1_ctx_t
{
58
apr_uint32_t
digest
[5];
60
apr_uint32_t
count_lo
,
count_hi
;
62
apr_uint32_t
data
[16];
64
int
local
;
65
};
66
82
APU_DECLARE
(
void
)
apr_sha1_base64
(
const
char
*
clear
,
int
len
,
char
*
out
);
83
88
APU_DECLARE
(
void
)
apr_sha1_init
(
apr_sha1_ctx_t
*
context
);
89
96
APU_DECLARE
(
void
)
apr_sha1_update
(
apr_sha1_ctx_t
*
context
,
const
char
*
input
,
97
unsigned
int
inputLen
);
98
105
APU_DECLARE
(
void
)
apr_sha1_update_binary
(
apr_sha1_ctx_t
*
context
,
106
const
unsigned
char
*
input
,
107
unsigned
int
inputLen
);
108
114
APU_DECLARE
(
void
)
apr_sha1_final
(
unsigned
char
digest
[
APR_SHA1_DIGESTSIZE
],
115
apr_sha1_ctx_t
*
context
);
116
117
#ifdef __cplusplus
118
}
119
#endif
120
121
#endif
/* APR_SHA1_H */
apr_general.h
APR Miscellaneous library routines.
input
const char * input
Definition
apr_sha1.h:96
inputLen
const char unsigned int inputLen
Definition
apr_sha1.h:97
context
apr_sha1_ctx_t * context
Definition
apr_sha1.h:115
out
int char * out
Definition
apr_sha1.h:82
APU_DECLARE
APU_DECLARE(void) apr_sha1_base64(const char *clear
APR_SHA1_DIGESTSIZE
#define APR_SHA1_DIGESTSIZE
Definition
apr_sha1.h:39
len
int len
Definition
apr_sha1.h:82
size
apr_size_t size
Definition
apr_allocator.h:115
apr_sha1_ctx_t
Definition
apr_sha1.h:56
apr_sha1_ctx_t::digest
apr_uint32_t digest[5]
Definition
apr_sha1.h:58
apr_sha1_ctx_t::count_hi
apr_uint32_t count_hi
Definition
apr_sha1.h:60
apr_sha1_ctx_t::local
int local
Definition
apr_sha1.h:64
apr_sha1_ctx_t::count_lo
apr_uint32_t count_lo
Definition
apr_sha1.h:60
apr_sha1_ctx_t::data
apr_uint32_t data[16]
Definition
apr_sha1.h:62
digest
const char * digest
Definition
testmd5.c:30
Generated by
1.9.8