]>
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 <security_comcryption/comcryption.h>
15 /* symmetric encrypt/decrypt context */
16 class ASCContext
: public AppleCSPContext
{
18 ASCContext(AppleCSPSession
&session
) :
19 AppleCSPContext(session
),
23 // called by CSPFullPluginSession
25 const Context
&context
,
26 bool encoding
= true);
29 size_t &inSize
, // in/out
31 size_t &outSize
); // in/out
36 size_t outSize
); // input for given output size
39 size_t inSize
= 0); // output for given input size
42 size_t &out
); // minimum progress chunks
48 * For first implementation, we have to cope with the fact that the final
49 * decrypt call down to the comcryption engine requires *some* ciphertext.
50 * On decrypt, we'll just save one byte on each update in preparation for
51 * the final call. Hopefull we'll have time to fix deComcryptData() so this
54 unsigned char mDecryptBuf
;
55 bool mDecryptBufValid
;
59 #endif /*_ASC_CONTEXT_H_ */
60 #endif /* ASC_CSP_ENABLE */