]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cdsa_utils/lib/cuPem.h
Security-58286.1.32.tar.gz
[apple/security.git] / OSX / libsecurity_cdsa_utils / lib / cuPem.h
1 /*
2 * Copyright (c) 2003,2011,2014 Apple Inc. All Rights Reserved.
3 *
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please
7 * obtain a copy of the License at http://www.apple.com/publicsource and
8 * read it before using this file.
9 *
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
12 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
13 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
14 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
15 * Please see the License for the specific language governing rights and
16 * limitations under the License.
17 */
18
19 /*
20 File: cuPem.h
21
22 Description: PEM encode/decode routines
23
24 Author: dmitch
25 */
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 int isPem(
32 const unsigned char *inData,
33 unsigned inDataLen);
34
35 int pemEncode(
36 const unsigned char *inData,
37 unsigned inFileLen,
38 unsigned char **outData,
39 unsigned *outDataLen,
40 const char *headerString);
41
42 int pemDecode(
43 const unsigned char *inData,
44 unsigned inFileLen,
45 unsigned char **outData,
46 unsigned *outDataLen);
47
48 #ifdef __cplusplus
49 }
50 #endif