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

Unique to Internet Passphrase

Unique to Application Passphrase

Properties

URL

The URL for the an Internet passphrase represented by receiver. (read-only)

@property (retain, readonly) NSURL *URL

Discussion

Warning: This attribute is unique to Internet passphrase item.

Declared In

WSCPassphraseItem.h

account

The NSString object that identifies the account of the keychain item represented by receiver.

@property (copy, readwrite) NSString *account

Declared In

WSCPassphraseItem.h

authenticationType

The value of type WSCInternetAuthenticationType that identifies the authentication type of an internet passphrase item represented by receiver.

@property (assign, readwrite) WSCInternetAuthenticationType authenticationType

Discussion

Warning: This attribute is unique to Internet passphrase item.

Declared In

WSCPassphraseItem.h

comment

The NSString object that identifies the comment of the keychain item represented by receiver.

@property (copy, readwrite) NSString *comment

Declared In

WSCPassphraseItem.h

hostName

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 *hostName

Discussion

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.h

isInvisible

BOOL value that indicates whether this passphrase item is invisible (that is, should not be displayed).

@property (assign, readwrite, setter=setInvisible:) BOOL isInvisible

Declared In

WSCPassphraseItem.h

isNegative

BOOL value that indicates whether there is a valid password associated with this passphrase item.

@property (assign, readwrite, setter=setNegative:) BOOL isNegative

Discussion

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.h

kindDescription

The NSString object that identifies the kind description of the keychain item represented by receiver.

@property (copy, readwrite) NSString *kindDescription

Declared In

WSCPassphraseItem.h

passphrase

The NSData object that contains the passphrase data of the keychain item represented by receiver.

@property (retain, readwrite) NSData *passphrase

Discussion

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.h

port

The value that identifies the Internet port of an internet passphrase item represented by receiver.

@property (assign, readwrite) NSUInteger port

Discussion

Warning: This attribute is unique to Internet passphrase item.

Declared In

WSCPassphraseItem.h

protocol

The value of type WSCInternetProtocolType that identifies the Internet protocol of an internet passphrase item represented by receiver.

@property (assign, readwrite) WSCInternetProtocolType protocol

Discussion

Warning: This attribute is unique to Internet passphrase item.

Declared In

WSCPassphraseItem.h

relativePath

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 *relativePath

Discussion

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.h

serviceName

The NSString object that identifies the service name of an application passphrase item represented by receiver.

@property (copy, readwrite) NSString *serviceName

Discussion

Warning: This attribute is unique to application passphrase item.

Declared In

WSCPassphraseItem.h

userDefinedData

The NSData object that contains a user-defined attribute.

@property (retain, readwrite) NSData *userDefinedData

Discussion

Warning: This attribute is unique to application passphrase item.

Declared In

WSCPassphraseItem.h