]>
git.saurik.com Git - apple/security.git/blob - OSX/include/security_cryptkit/CipherFileFEED.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 * CipherFileFEED.h - FEED and FEEDExp related cipherfile support
19 #ifndef _CK_CFILEFEED_H_
20 #define _CK_CFILEFEED_H_
24 #if CRYPTKIT_CIPHERFILE_ENABLE
27 #include "feeCipherFile.h"
36 feeReturn
createFEED(feePubKey sendPrivKey
,
38 const unsigned char *plainText
,
39 unsigned plainTextLen
,
40 int genSig
, // 1 ==> generate signature
41 unsigned userData
, // for caller's convenience
42 feeCipherFile
*cipherFile
); // RETURNED if successful
43 feeReturn
decryptFEED(feeCipherFile cipherFile
,
44 feePubKey recvPrivKey
,
46 unsigned char **plainText
, // RETURNED
47 unsigned *plainTextLen
, // RETURNED
48 feeSigStatus
*sigStatus
); // RETURNED
49 feeReturn
createFEEDExp(feePubKey sendPrivKey
,
51 const unsigned char *plainText
,
52 unsigned plainTextLen
,
53 int genSig
, // 1 ==> generate signature
54 unsigned userData
, // for caller's convenience
55 feeCipherFile
*cipherFile
); // RETURNED if successful
56 feeReturn
decryptFEEDExp(feeCipherFile cipherFile
,
57 feePubKey recvPrivKey
,
58 feePubKey sendPubKey
, // optional
59 unsigned char **plainText
, // RETURNED
60 unsigned *plainTextLen
, // RETURNED
61 feeSigStatus
*sigStatus
); // RETURNED
67 #endif /* CRYPTKIT_CIPHERFILE_ENABLE */
69 #endif /*_CK_CFILEFEED_H_*/