C# Class iOSPasswordStorage.KeychainHelpers

Keychain helpers. These work on iOS7 onwards only. For compatibility with previoous iOS versions, the "Synchronizable" property must be removed / ignored.
显示文件 Open project: Krumelur/iOSPasswordStorage Class Usage Examples

Public Methods

Method Description
DeletePasswordForUsername ( string username, string serviceId, bool synchronizable ) : SecStatusCode

Deletes a username/password record.

GetPasswordForUsername ( string username, string serviceId, bool synchronizable ) : string

Gets a password for a specific username.

SetPasswordForUsername ( string username, string password, string serviceId, SecAccessible secAccessible, bool synchronizable ) : SecStatusCode

Sets a password for a specific username.

Method Details

DeletePasswordForUsername() public static method

Deletes a username/password record.
public static DeletePasswordForUsername ( string username, string serviceId, bool synchronizable ) : SecStatusCode
username string the username to query. Not case sensitive. May not be NULL.
serviceId string the service description to query. Not case sensitive. May not be NULL.
synchronizable bool /// Defines if the record you want to delete is syncable via iCloud keychain or not. Note that using the same username and service ID /// but different synchronization settings will result in two keychain entries. ///
return SecStatusCode

GetPasswordForUsername() public static method

Gets a password for a specific username.
public static GetPasswordForUsername ( string username, string serviceId, bool synchronizable ) : string
username string the username to query. Not case sensitive. May not be NULL.
serviceId string the service description to use. Not case sensitive. May not be NULL.
synchronizable bool /// Defines if the record you want to get is syncable via iCloud keychain or not. Note that using the same username and service ID /// but different synchronization settings will result in two keychain entries. ///
return string

SetPasswordForUsername() public static method

Sets a password for a specific username.
public static SetPasswordForUsername ( string username, string password, string serviceId, SecAccessible secAccessible, bool synchronizable ) : SecStatusCode
username string the username to add the password for. Not case sensitive. May not be NULL.
password string the password to associate with the record. May not be NULL.
serviceId string the service description to use. Not case sensitive. May not be NULL.
secAccessible SecAccessible defines how the keychain record is protected
synchronizable bool /// Defines if keychain record can by synced via iCloud keychain. /// Note that using the same username and service ID but different synchronization settings will result in two keychain entries. ///
return SecStatusCode