This repository has been archived by the owner on Aug 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
ORSCredentialsManager.h
92 lines (78 loc) · 2.1 KB
/
ORSCredentialsManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/*!
@header ORSCredentialsManager
@abstract Contains methods for managing user credentials in the Keychain
Manager.
@author Nicholas Toumpelis
@copyright Nicholas Toumpelis, Ocean Road Software
@version 0.7
@updated 2009-04-12
*/
#import <Cocoa/Cocoa.h>
#import <Security/Security.h>
#include <CoreServices/CoreServices.h>
#include <CoreFoundation/CoreFoundation.h>
#define APP_CNAME "Canary"
#define APP_CNAME_LENGTH 6
/*!
@class ORSCredentialsManager
@group Credentials Manager
@abstract Contains methods for managing user credentials in the Keychain
Manager.
@author Nicholas Toumpelis
@version 0.6
@updated 2008-10-18
*/
@interface ORSCredentialsManager : NSObject {
@private
UInt32 passwordLength;
UInt32 twitterPasswordLength;
void *passwordData;
void *twitterPasswordData;
SecKeychainItemRef loginItem;
NSString *lastCheckedUsername;
NSString *lastCheckedTwitterUsername;
}
/*!
@method hasPasswordForUser:
Determines whether the specified user has a password in the keychain.
*/
- (BOOL) hasPasswordForUser:(NSString *)username;
/*!
@method passwordForUser:
Retrieves the password for the specified user.
*/
- (NSString *) passwordForUser:(NSString *)username;
/*!
@method addPassword:forUser:
Adds a password to the keychain manager for the specified username.
*/
- (BOOL) addPassword:(NSString *)password
forUser:(NSString *)username;
/*!
@method setPassword:forUser:
Sets a password in the keychain manager for the specified username.
*/
- (BOOL) setPassword:(NSString *)password
forUser:(NSString *)username;
/*!
@method hasStoredTwitterPasswordForUser:
Determines whether the specified user has a twitter password in
the keychain
*/
- (BOOL) hasStoredTwitterPasswordForUser:(NSString *)username;
/*!
@method storedTwitterPasswordForUser:
Retrieves the current Twitter web password (saved in the keychain).
*/
- (NSString *) storedTwitterPasswordForUser:(NSString *)username;
/*!
@method fetchedPassword
Returns the previously retrieved password.
*/
- (NSString *) fetchedPassword;
/*!
@method freeBuffer
Frees the data buffer.
*/
- (void) freeBuffer;
@end