SecKeyChain Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Access to the operating system keychain.
public class SecKeyChain : ObjCRuntime.INativeObject
type SecKeyChain = class
interface INativeObject
- Inheritance
-
SecKeyChain
- Implements
Remarks
This class can be used to add, remove, update or query the iOS or MacOS keychain. MacOS is limited to a single kind of password (SecKind.InternetPassword) while iOS offers a wider range of options.
Use QueryAsData(SecRecord, Boolean, Int32, SecStatusCode) to get values from the keychain as a binary blob. Some of the overloads can also return binary blobs that are suitable to be stored on disk, or passed to another process.
Use QueryAsConcreteType(SecRecord, SecStatusCode) to get a SecCertificate, a SecKey or a SecIdentity back from the keychain.
Use M:Security.SecKeyChain.QueryAsRecord* to get a strongly typed SecRecord with the results of your query.
var query = new SecRecord (SecKind.InternetPassword) {
Server = "bugzilla.novell.com",
Account = "miguel"
};
var password = SecKeyChain.QueryAsData (query);
Console.WriteLine ("The password for the account is: {0}", password);
Properties
Handle |
Handle (pointer) to the unmanaged object representation. |