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
8
* http://www.apache.org/licenses/LICENSE-2.0
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.
18
* @package Apache MD5 library
21
//#include "apr_md5.h"
24
* Create an MD5 checksum of a given string
25
* @param a Pool to allocate out of
26
* @param string String to get the checksum of
27
* @return The checksum
28
* @deffunc char *ap_md5(apr_pool_t *a, const unsigned char *string)
30
function ap_md5(p: Papr_pool_t; const string_: PChar): PChar;
31
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
32
external LibHTTPD name LibNamePrefix + 'ap_md5' + LibSuff8;
35
* Create an MD5 checksum of a string of binary data
36
* @param a Pool to allocate out of
37
* @param buf Buffer to generate checksum for
38
* @param len The length of the buffer
39
* @return The checksum
40
* @deffunc char *ap_md5_binary(apr_pool_t *a, const unsigned char *buf, int len)
42
function ap_md5_binary(a: Papr_pool_t; const buf: PChar; len: Integer): PChar;
43
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
44
external LibHTTPD name LibNamePrefix + 'ap_md5_binary' + LibSuff12;
47
* Convert an MD5 checksum into a base64 encoding
48
* @param p The pool to allocate out of
49
* @param context The context to convert
50
* @return The converted encoding
51
* @deffunc char *ap_md5contextTo64(apr_pool_t *p, apr_md5_ctx_t *context)
53
function ap_md5contextTo64(a: Papr_pool_t; context: Papr_md5_ctx_t): PChar;
54
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
55
external LibHTTPD name LibNamePrefix + 'ap_md5contextTo64' + LibSuff8;
58
* Create an MD5 Digest for a given file
59
* @param p The pool to allocate out of
60
* @param infile The file to create the digest for
61
* @deffunc char *ap_md5digest(apr_pool_t *p, apr_file_t *infile)
63
function ap_md5digest(p: Papr_pool_t; infile: Papr_file_t): PChar;
64
{$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
65
external LibHTTPD name LibNamePrefix + 'ap_md5digest' + LibSuff8;