]>
git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cryptkit/lib/enc64.h
1 /* Copyright (c) 1998,2011,2014 Apple Inc. All Rights Reserved.
3 * NOTICE: USE OF THE MATERIALS ACCOMPANYING THIS NOTICE IS SUBJECT
4 * TO THE TERMS OF THE SIGNED "FAST ELLIPTIC ENCRYPTION (FEE) REFERENCE
5 * SOURCE CODE EVALUATION AGREEMENT" BETWEEN APPLE, INC. AND THE
6 * ORIGINAL LICENSEE THAT OBTAINED THESE MATERIALS FROM APPLE,
7 * INC. ANY USE OF THESE MATERIALS NOT PERMITTED BY SUCH AGREEMENT WILL
8 * EXPOSE YOU TO LIABILITY.
9 ***************************************************************************
11 * enc64.h - encode/decode in 64-char IA5 format, per RFC 1421
27 * Given input buffer inbuf, length inlen, decode from 64-char IA5 format to
28 * binary. Result is fmalloced and returned; its length is returned in *outlen.
29 * NULL return indicates corrupted input.
31 unsigned char *enc64(const unsigned char *inbuf
,
33 unsigned *outlen
); // RETURNED
36 * Enc64, with embedded newlines every lineLen in result. A newline is
37 * the Microsoft-style "\r\n".
39 unsigned char *enc64WithLines(const unsigned char *inbuf
,
42 unsigned *outlen
); // RETURNED
45 * Given input buffer inbuf, length inlen, decode from 64-char IA5 format to
46 * binary. Result is fmalloced and returned; its length is returned in *outlen.
47 * NULL return indicates corrupted input. All whitespace in inbuf is
50 unsigned char *dec64(const unsigned char *inbuf
,
55 * Determine if specified input data is valid enc64 format. Returns 1
58 int isValidEnc64(const unsigned char *inbuf
,
65 #endif /*_CK_ENC64_H_*/