]> git.saurik.com Git - apple/security.git/blob - SecurityTests/cspxutils/aesVect/enDecrypt.h
Security-57031.1.35.tar.gz
[apple/security.git] / SecurityTests / cspxutils / aesVect / enDecrypt.h
1 #include <Security/cssmtype.h>
2 #include <Security/cssmerr.h>
3
4 /*
5 * encrypt/decrypt using test implementation.
6 */
7 CSSM_RETURN encryptDecryptTest(
8 CSSM_BOOL forEncrypt,
9 uint32 keyBits,
10 uint32 blockSizeInBits,
11 const uint8 *key, // raw key bytes
12 const uint8 *inText,
13 uint32 inTextLen, // in bytes
14 uint8 *outText);
15
16 /*
17 * encrypt/decrypt using reference AES.
18 */
19 CSSM_RETURN encryptDecryptRef(
20 CSSM_BOOL forEncrypt,
21 uint32 keyBits,
22 uint32 blockSizeInBits,
23 const uint8 *key, // raw key bytes
24 const uint8 *inText,
25 uint32 inTextLen, // in bytes
26 uint8 *outText);
27
28 /*
29 * encrypt/decrypt using CSP.
30 */
31 CSSM_RETURN encryptDecryptCsp(
32 CSSM_BOOL forEncrypt,
33 uint32 keyBits,
34 uint32 blockSizeInBits,
35 const uint8 *key, // raw key bytes
36 const uint8 *inText,
37 uint32 inTextLen, // in bytes
38 uint8 *outText);
39
40 typedef CSSM_RETURN (*encrDecrFcn) (
41 CSSM_BOOL forEncrypt,
42 uint32 keyBits,
43 uint32 blockSizeInBits,
44 const uint8 *key, // raw key bytes
45 const uint8 *inText,
46 uint32 inTextLen, // in bytes
47 uint8 *outText);