]>
git.saurik.com Git - apple/security.git/blob - libsecurity_apple_csp/lib/ascContext.h
2 * ascContext.h - glue between BlockCrytpor and ComCryption (a.k.a. Apple
4 * Written by Doug Mitchell 4/4/2001
9 #ifndef _ASC_CONTEXT_H_
10 #define _ASC_CONTEXT_H_
12 #include "AppleCSPContext.h"
13 #include <CoreServices/../Frameworks/CarbonCore.framework/Headers/MacTypes.h>
14 #include <security_comcryption/comcryption.h>
16 /* symmetric encrypt/decrypt context */
17 class ASCContext
: public AppleCSPContext
{
19 ASCContext(AppleCSPSession
&session
) :
20 AppleCSPContext(session
),
24 // called by CSPFullPluginSession
26 const Context
&context
,
27 bool encoding
= true);
30 size_t &inSize
, // in/out
32 size_t &outSize
); // in/out
37 size_t outSize
); // input for given output size
40 size_t inSize
= 0); // output for given input size
43 size_t &out
); // minimum progress chunks
49 * For first implementation, we have to cope with the fact that the final
50 * decrypt call down to the comcryption engine requires *some* ciphertext.
51 * On decrypt, we'll just save one byte on each update in preparation for
52 * the final call. Hopefull we'll have time to fix deComcryptData() so this
55 unsigned char mDecryptBuf
;
56 bool mDecryptBufValid
;
60 #endif /*_ASC_CONTEXT_H_ */
61 #endif /* ASC_CSP_ENABLE */