]> git.saurik.com Git - apple/security.git/blob - OSX/sec/Security/SecServerEncryptionSupport.h
Security-59306.101.1.tar.gz
[apple/security.git] / OSX / sec / Security / SecServerEncryptionSupport.h
1 //
2 // SecServerEncryptionSupport.h
3 //
4 //
5
6 #ifndef _SECURITY_SECSERVERENCRYPTIONSUPPORT_H_
7 #define _SECURITY_SECSERVERENCRYPTIONSUPPORT_H_
8
9 #include <Availability.h>
10 #include <CoreFoundation/CoreFoundation.h>
11 #include <Security/SecKey.h>
12 #include <Security/SecTrust.h>
13
14 // Deprecating for security motives (28715251).
15 // Compatible implementation still available in SecKey with
16 // kSecKeyAlgorithmECIESEncryptionStandardX963SHA256AESGCM but should also be
17 // deprecated for the same reason (28496795).
18
19 CFDataRef SecCopyEncryptedToServer(SecTrustRef trustedEvaluation, CFDataRef dataToEncrypt, CFErrorRef *error)
20 __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_12, __MAC_10_13, __IPHONE_8_0, __IPHONE_11_0, "Migrate to SecKeyCreateEncryptedData with kSecKeyAlgorithmECIESEncryptionStandardVariableIV* or Security Foundation SFIESOperation for improved security (encryption is not compatible)");
21
22 //
23 // For testing
24 //
25 /* Caution: These functions take an iOS SecKeyRef. Careful use is required on OS X. */
26 CFDataRef SecCopyDecryptedForServer(SecKeyRef serverFullKey, CFDataRef encryptedData, CFErrorRef* error)
27 API_DEPRECATED("Migrate to SecKeyCreateEncryptedData with kSecKeyAlgorithmECIESEncryptionStandardVariableIV* or Security Foundation SFIESOperation for improved security (encryption is not compatible)", macos(10.12,10.13), ios(8.0,11.0));
28 // SFIESCiphertext
29
30
31 CFDataRef SecCopyEncryptedToServerKey(SecKeyRef publicKey, CFDataRef dataToEncrypt, CFErrorRef *error)
32 __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_12, __MAC_10_13, __IPHONE_8_0, __IPHONE_11_0,"Migrate to SecKeyCreateEncryptedData with kSecKeyAlgorithmECIESEncryptionStandardVariableIV* or Security Foundation SFIESOperation for improved security (encryption is not compatible)");
33
34 #endif