Cccryptorstatus Cccryptorcreate (
Ccoperation op,/* Kccencrypt, etc. */
Ccalgorithm ALG,/* kccalgorithmdes, etc. */
Ccoptions options,/* kccoptionpkcs7padding, etc. */
const void *key,/* RAW key material */
size_t Keylength,
const void *IV,/* Optional initialization vector */
Cccryptorref *cryptorref)/* returned */
enum {
Kccencrypt = 0,
Kccdecrypt,
};
typedef uint32_t Ccoperation;
enum {
/* Options for block ciphers */
kccoptionpkcs7padding = 0x0001,
Kccoptionecbmode = 0x0002
/* Stream ciphers currently have no options */
};
typedef uint32_t Ccoptions;
enum {
kCCAlgorithmAES128 = 0,
Kccalgorithmaes = 0,
Kccalgorithmdes,
Kccalgorithm3des,
Kccalgorithmcast,
KCCAlgorithmRC4,
KCCAlgorithmRC2,
Kccalgorithmblowfish
};
typedef uint32_t CCALGORITHM;
Osstatus Seckeyencrypt (
Seckeyref Key,
Secpadding padding,
Const uint8_t *plaintext,
size_t Plaintextlen,
uint8_t *ciphertext,
size_t *ciphertextlen)
__osx_available_starting (__mac_10_7, __iphone_2_0);
IOS Encryption Algorithm Rollup