Apache HTTPD
framework
httpd-2.4.62
srclib
apr-util
include
apr_base64.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
* The apr_vsnprintf/apr_snprintf functions are based on, and used with the
16
* permission of, the SIO stdio-replacement strx_* functions by Panos
17
* Tsirigotis <
[email protected]
> for xinetd.
18
*/
19
24
#ifndef APR_BASE64_H
25
#define APR_BASE64_H
26
27
#include "apu.h"
28
#include "
apr_general.h
"
29
30
#ifdef __cplusplus
31
extern
"C"
{
32
#endif
33
40
/* Simple BASE64 encode/decode functions.
41
*
42
* As we might encode binary strings, hence we require the length of
43
* the incoming plain source. And return the length of what we decoded.
44
*
45
* The decoding function takes any non valid char (i.e. whitespace, \0
46
* or anything non A-Z,0-9 etc as terminal.
47
*
48
* plain strings/binary sequences are not assumed '\0' terminated. Encoded
49
* strings are neither. But probably should.
50
*
51
*/
52
60
APU_DECLARE
(
int
)
apr_base64_encode_len
(
int
len
);
61
69
APU_DECLARE
(
int
)
apr_base64_encode
(
char
*
coded_dst
,
const
char
*
plain_src
,
70
int
len_plain_src
);
71
79
APU_DECLARE
(
int
)
apr_base64_encode_binary
(
char
*
coded_dst
,
80
const
unsigned
char
*
plain_src
,
81
int
len_plain_src
);
82
89
APU_DECLARE
(
int
)
apr_base64_decode_len
(
const
char
*
coded_src
);
90
97
APU_DECLARE
(
int
)
apr_base64_decode
(
char
*
plain_dst
,
const
char
*
coded_src
);
98
105
APU_DECLARE
(
int
)
apr_base64_decode_binary
(
unsigned
char
*
plain_dst
,
106
const
char
*
coded_src
);
107
109
#ifdef __cplusplus
110
}
111
#endif
112
113
#endif
/* !APR_BASE64_H */
len
const char apr_size_t len
Definition
ap_regex.h:187
apr_general.h
APR Miscellaneous library routines.
APU_DECLARE
APU_DECLARE(void)
Computes SipHash-2-4, producing a 64bit (APR_SIPHASH_DSIZE) hash from a message and a 128bit (APR_SIP...
Definition
apr_sha1.c:206
coded_src
const char * coded_src
Definition
apr_base64.h:97
len_plain_src
const char int len_plain_src
Definition
apr_base64.h:70
plain_src
const char * plain_src
Definition
apr_base64.h:69
size
apr_size_t size
Definition
apr_allocator.h:115
Generated by
1.9.8