WSCPassphraseItem Class Reference
| Inherits from | WSCProtectedKeychainItem : WSCKeychainItem : NSObject |
| Declared in | WSCPassphraseItem.h WSCPassphraseItem.m |
Overview
The WSCPassphraseItem class is a subclass of WSCProtectedKeychainItem
that contains information about application passphrase and Internet passphrase.
Tasks
Common Passphrase Attributes
-
accountproperty -
commentproperty -
kindDescriptionproperty -
passphraseproperty -
isInvisibleproperty -
isNegativeproperty
Unique to Internet Passphrase
-
URLproperty -
hostNameproperty -
relativePathproperty -
authenticationTypeproperty -
protocolproperty -
portproperty
Unique to Application Passphrase
-
serviceNameproperty -
userDefinedDataproperty
Properties
URL
The URL for the an Internet passphrase represented by receiver. (read-only)
@property (retain, readonly) NSURL *URLDiscussion
Warning: This attribute is unique to Internet passphrase item.
Declared In
WSCPassphraseItem.haccount
The NSString object that identifies the account of the keychain item represented by receiver.
@property (copy, readwrite) NSString *accountDeclared In
WSCPassphraseItem.hauthenticationType
The value of type WSCInternetAuthenticationType that identifies the authentication type of an internet passphrase item represented by receiver.
@property (assign, readwrite) WSCInternetAuthenticationType authenticationTypeDiscussion
Warning: This attribute is unique to Internet passphrase item.
Declared In
WSCPassphraseItem.hcomment
The NSString object that identifies the comment of the keychain item represented by receiver.
@property (copy, readwrite) NSString *commentDeclared In
WSCPassphraseItem.hhostName
The NSString object that identifies the the host of a URL conforming to RFC 1808
of an Internet passphrase item represented by receiver.
@property (copy, readwrite) NSString *hostNameDiscussion
For example: in the URL “https://github.com/TongG/WaxSealCore”, the host is “github.com”.
If the URL of receiver does not conform to RFC 1808, returns nil.
Warning: This attribute is unique to Internet passphrase item.
Declared In
WSCPassphraseItem.hisInvisible
BOOL value that indicates whether this passphrase item is invisible (that is, should not be displayed).
@property (assign, readwrite, setter=setInvisible:) BOOL isInvisibleDeclared In
WSCPassphraseItem.hisNegative
BOOL value that indicates whether there is a valid password associated with this passphrase item.
@property (assign, readwrite, setter=setNegative:) BOOL isNegativeDiscussion
This is useful if your application doesn’t want a password for some particular service to be stored in the keychain, but prefers that it always be entered by the user.
Declared In
WSCPassphraseItem.hkindDescription
The NSString object that identifies the kind description of the keychain item represented by receiver.
@property (copy, readwrite) NSString *kindDescriptionDeclared In
WSCPassphraseItem.hpassphrase
The NSData object that contains the passphrase data of the keychain item represented by receiver.
@property (retain, readwrite) NSData *passphraseDiscussion
The following code fragment demonstrates how to retrieve/set the passphrase of an passphrase item:
Retrieve Passphrase:
NSData* secretData = [ demoPassphraseItem passphrase ];
NSString* passphraseString =
[ [ [ NSString alloc ] initWithData: secretData encoding: NSUTF8StringEncoding ] autorelease ];
Set Passphrase:
// The string to be set as the passphrase of an passphrase item.
NSString* passphraseString = @"waxsealcore";
NSData* secretData = [ passphraseString dataUsingEncoding: NSUTF8StringEncoding
allowLossyConversion: NO ];
// Now the passphrase of the passphrase item represeted by demoPassphraseItem is "waxsealcore".
demoPassphraseItem.passphrase = secretData;
Declared In
WSCPassphraseItem.hport
The value that identifies the Internet port of an internet passphrase item represented by receiver.
@property (assign, readwrite) NSUInteger portDiscussion
Warning: This attribute is unique to Internet passphrase item.
Declared In
WSCPassphraseItem.hprotocol
The value of type WSCInternetProtocolType that identifies the Internet protocol of an internet passphrase item represented by receiver.
@property (assign, readwrite) WSCInternetProtocolType protocolDiscussion
Warning: This attribute is unique to Internet passphrase item.
Declared In
WSCPassphraseItem.hrelativePath
The NSString object that identifies the relative path of a URL conforming to RFC 1808
of an Internet passphrase item represented by receiver.
@property (copy, readwrite) NSString *relativePathDiscussion
For example: in the URL “https://github.com/TongG/WaxSealCore”, the relative URL path is “/TongG/WaxSealCore”.
If the URL of receiver does not conform to RFC 1808, returns nil.
Warning: This attribute is unique to Internet passphrase item.
Declared In
WSCPassphraseItem.hserviceName
The NSString object that identifies the service name of an application passphrase item represented by receiver.
@property (copy, readwrite) NSString *serviceNameDiscussion
Warning: This attribute is unique to application passphrase item.
Declared In
WSCPassphraseItem.huserDefinedData
The NSData object that contains a user-defined attribute.
@property (retain, readwrite) NSData *userDefinedDataDiscussion
Warning: This attribute is unique to application passphrase item.
Declared In
WSCPassphraseItem.h