]>
git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_cryptkit/lib/CipherFileDES.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 * CipherFileDES.h - DES-related cipherfile support
19 #ifndef _CK_CFILEDES_H_
20 #define _CK_CFILEDES_H_
24 #if CRYPTKIT_CIPHERFILE_ENABLE
27 #include "feeCipherFile.h"
28 #include "CipherFileTypes.h"
34 feeReturn
createRandDES(feePubKey sendPrivKey
,
36 const unsigned char *plainText
,
37 unsigned plainTextLen
,
38 int genSig
, // 1 ==> generate signature
39 unsigned userData
, // for caller's convenience
40 feeCipherFile
*cipherFile
); // RETURNED if successful
41 feeReturn
decryptRandDES(feeCipherFile cipherFile
,
42 feePubKey recvPrivKey
,
44 unsigned char **plainText
, // RETURNED
45 unsigned *plainTextLen
, // RETURNED
46 feeSigStatus
*sigStatus
); // RETURNED
47 feeReturn
createPubDES(feePubKey sendPrivKey
, // required
48 feePubKey recvPubKey
, // required
49 const unsigned char *plainText
,
50 unsigned plainTextLen
,
51 int genSig
, // 1 ==> generate signature
52 unsigned userData
, // for caller's convenience
53 feeCipherFile
*cipherFile
); // RETURNED if successful
54 feeReturn
decryptPubDES(feeCipherFile cipherFile
,
55 feePubKey recvPrivKey
,
56 feePubKey sendPubKey
, // optional
57 unsigned char **plainText
, // RETURNED
58 unsigned *plainTextLen
, // RETURNED
59 feeSigStatus
*sigStatus
); // RETURNED
65 #endif /* CRYPTKIT_CIPHERFILE_ENABLE*/
67 #endif /*_CK_CFILEDES_H_*/