]> git.saurik.com Git - apple/security.git/blob - OSX/sec/Security/SecServerEncryptionSupport.h
Security-57740.60.18.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 CFDataRef SecCopyEncryptedToServer(SecTrustRef trustedEvaluation, CFDataRef dataToEncrypt, CFErrorRef *error)
15 __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_8_0);
16
17 //
18 // For testing
19 //
20 /* Caution: These functions take an iOS SecKeyRef. Careful use is required on OS X. */
21 CFDataRef SecCopyDecryptedForServer(SecKeyRef serverFullKey, CFDataRef encryptedData, CFErrorRef* error)
22 __OSX_AVAILABLE_STARTING(__MAC_NA, __IPHONE_8_0);
23
24 CFDataRef SecCopyEncryptedToServerKey(SecKeyRef publicKey, CFDataRef dataToEncrypt, CFErrorRef *error)
25 __OSX_AVAILABLE_STARTING(__MAC_10_12, __IPHONE_8_0);
26
27 #endif