SecRecord SecRecord Class

Definition

Tracks a set of properties from the keychain.

public class SecRecord : IDisposable
type SecRecord = class
    interface IDisposable
Inheritance
SecRecordSecRecord
Implements

Remarks

This represents a set of properties on a keychain record. It can be used to query the keychain by filling out a few of the properties and calling one of the Query methods on the SecKeyChain class and it is also used as a result from some of the same Query methods.

You would typically use it like this:


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);

Constructors

SecRecord() SecRecord()
SecRecord(SecCertificate) SecRecord(SecCertificate)
SecRecord(SecIdentity) SecRecord(SecIdentity)
SecRecord(SecKey) SecRecord(SecKey)
SecRecord(SecKind) SecRecord(SecKind)

Creates a keychain record.

Properties

AccessControl AccessControl

Access control for the item.

AccessGroup AccessGroup

Access group name.

Accessible Accessible

When should the keychain information be accessed.

Account Account

Accout name.

ApplicationLabel ApplicationLabel

An application-level tag, used to identify this key.

ApplicationTag ApplicationTag

To store your application data.

AuthenticationContext AuthenticationContext
AuthenticationType AuthenticationType

The authentication type.

AuthenticationUI AuthenticationUI
CanDecrypt CanDecrypt

Whether this cryptographic key can be used to decrypt data.

CanDerive CanDerive

Whether this key can be used to derive another key.

CanEncrypt CanEncrypt

Whether this cryptographic key can be used to encrypt data.

CanSign CanSign

Whether this key can be used to sign data.

CanUnwrap CanUnwrap

Whether this key can be used to unwrap another key.

CanVerify CanVerify

Whether this key can be used to verify a digital signature.

CanWrap CanWrap

Whether this key can be used to wrap another key.

CertificateEncoding CertificateEncoding

The encoding used for the certificate.

CertificateType CertificateType

A certificate type.

Comment Comment

Used editable comment for this record.

CreationDate CreationDate

Creation date for this item.

Creator Creator

Creator key, a 32-bit value

CreatorType CreatorType

Item's type. 32-bit value.

Description Description

User visible description of this item.

EffectiveKeySize EffectiveKeySize

Number of effective bits on the key.

Generic Generic

Generic password's NSData storage.

Invisible Invisible

If set, the item is not displayed to the user.

IsExtractable IsExtractable
IsNegative IsNegative

Whether there is a valid password associated.

IsPermanent IsPermanent
IsSensitive IsSensitive
Issuer Issuer

X.500 Issuer certificate name as an NSData block.

KeyClass KeyClass

The key class.

KeySizeInBits KeySizeInBits

Bitsize for the key, contrast this with EffectiveKeySize.

KeyType KeyType

The key type.

Label Label

User visible label for this item.

MatchCaseInsensitive MatchCaseInsensitive

Whether matches should be case insensitive

MatchEmailAddressIfPresent MatchEmailAddressIfPresent
MatchIssuers MatchIssuers
MatchItemList MatchItemList
MatchPolicy MatchPolicy
MatchSubjectContains MatchSubjectContains
MatchTrustedOnly MatchTrustedOnly
MatchValidOnDate MatchValidOnDate
ModificationDate ModificationDate
Path Path

Path component of an InternetPassword.

PersistentReference PersistentReference
Port Port

Port component of an InternetPassword

Protocol Protocol

Protocol component of an InternetPassword.

PublicKeyHash PublicKeyHash

Public key hash

SecurityDomain SecurityDomain

Security domain for InternetPassword items.

SerialNumber SerialNumber

Serial number for the certificate.

Server Server

Server component for an InternetPassword

Service Service

Service associated with an InternetPassword.

Subject Subject

X.500 Subject name stored as an NSData.

SubjectKeyID SubjectKeyID

SubjectKeyID of the certificate.

Synchronizable Synchronizable
SynchronizableAny SynchronizableAny
SyncViewHint SyncViewHint
TokenID TokenID
UseNoAuthenticationUI UseNoAuthenticationUI

Developers should not use this deprecated property. Developers should use AuthenticationUI property

UseOperationPrompt UseOperationPrompt

User facing description of the kind of authentication that the application is trying to perform

ValueData ValueData

The value data to store.

Methods

Clone() Clone()

Makes a copy of this SecRecord.

Dispose(Boolean) Dispose(Boolean)

Releases the resources used by the SecRecord object.

Dispose() Dispose()

Releases the resources used by the SecRecord object.

Finalize() Finalize()

Finalizer for the SecRecord object

GetCertificate() GetCertificate()
GetIdentity() GetIdentity()
GetKey() GetKey()
GetValueRef<T>() GetValueRef<T>()

Returns the associated Certificate, Identity, or Key stored in this record.

SetCertificate(SecCertificate) SetCertificate(SecCertificate)
SetIdentity(SecIdentity) SetIdentity(SecIdentity)
SetKey(SecKey) SetKey(SecKey)
SetValueRef(INativeObject) SetValueRef(INativeObject)

Use this to add a certificate, identity or key to the record.

ToDictionary() ToDictionary()

Applies to

See also