]> git.saurik.com Git - apple/security.git/blob - OSX/sec/Security/SecRecoveryKey.h
Security-59754.80.3.tar.gz
[apple/security.git] / OSX / sec / Security / SecRecoveryKey.h
1 //
2 // SecRecoveryKey.h
3 //
4 //
5
6 #ifndef SecRecoveryKey_h
7 #define SecRecoveryKey_h
8
9 #include <Security/Security.h>
10 #if __OBJC__
11 @class SecRecoveryKey;
12 #else
13 typedef struct __SecRecoveryKey SecRecoveryKey;
14 #endif
15
16 bool
17 SecRKRegisterBackupPublicKey(SecRecoveryKey *rk, CFErrorRef *error);
18
19 #if __OBJC__
20
21 /*
22 * Constants for the verifier dictionary returned from SecRKCopyAccountRecoveryVerifier
23 */
24
25 extern NSString *const kSecRVSalt;
26 extern NSString *const kSecRVIterations;
27 extern NSString *const kSecRVProtocol;
28 extern NSString *const kSecRVVerifier;
29 extern NSString *const kSecRVMasterID;
30
31
32 SecRecoveryKey *
33 SecRKCreateRecoveryKey(NSString *recoveryKey);
34
35 SecRecoveryKey *
36 SecRKCreateRecoveryKeyWithError(NSString *masterKey, NSError **error);
37
38 NSString *
39 SecRKCreateRecoveryKeyString(NSError **error);
40
41 NSString *
42 SecRKCopyAccountRecoveryPassword(SecRecoveryKey *rk);
43
44 NSData *
45 SecRKCopyBackupFullKey(SecRecoveryKey *rk);
46
47 NSData *
48 SecRKCopyBackupPublicKey(SecRecoveryKey *rk);
49
50 NSDictionary *
51 SecRKCopyAccountRecoveryVerifier(NSString *recoveryKey,
52 NSError **error);
53
54 #else
55
56 SecRecoveryKey *
57 SecRKCreateRecoveryKey(CFStringRef recoveryKey);
58
59 CFDataRef
60 SecRKCopyBackupFullKey(SecRecoveryKey *rk);
61
62 CFDataRef
63 SecRKCopyBackupPublicKey(SecRecoveryKey *rk);
64
65 #endif
66
67 #endif