Bearbeiten

Freigeben über


SecRecord Class

Definition

Tracks a set of properties from the keychain.

public class SecRecord : IDisposable
type SecRecord = class
    interface IDisposable
Inheritance
SecRecord
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(SecCertificate)
SecRecord(SecIdentity)
SecRecord(SecKey)
SecRecord(SecKind)

Creates a keychain record.

Properties

AccessControl

Access control for the item.

AccessGroup

Access group name.

Accessible

When should the keychain information be accessed.

Account

Accout name.

ApplicationLabel

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

ApplicationTag

To store your application data.

AuthenticationContext
AuthenticationType

The authentication type.

AuthenticationUI
CanDecrypt

Whether this cryptographic key can be used to decrypt data.

CanDerive

Whether this key can be used to derive another key.

CanEncrypt

Whether this cryptographic key can be used to encrypt data.

CanSign

Whether this key can be used to sign data.

CanUnwrap

Whether this key can be used to unwrap another key.

CanVerify

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

CanWrap

Whether this key can be used to wrap another key.

CertificateEncoding

The encoding used for the certificate.

CertificateType

A certificate type.

Comment

Used editable comment for this record.

CreationDate

Creation date for this item.

Creator

Creator key, a 32-bit value

CreatorType

Item's type. 32-bit value.

Description

User visible description of this item.

EffectiveKeySize

Number of effective bits on the key.

Generic

Generic password's NSData storage.

Invisible

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

IsExtractable
IsNegative

Whether there is a valid password associated.

IsPermanent
IsSensitive
Issuer

X.500 Issuer certificate name as an NSData block.

KeyClass

The key class.

KeySizeInBits

Bitsize for the key, contrast this with EffectiveKeySize.

KeyType

The key type.

Label

User visible label for this item.

MatchCaseInsensitive

Whether matches should be case insensitive

MatchEmailAddressIfPresent
MatchIssuers
MatchItemList
MatchPolicy
MatchSubjectContains
MatchTrustedOnly
MatchValidOnDate
ModificationDate
Path

Path component of an InternetPassword.

PersistentReference
Port

Port component of an InternetPassword

Protocol

Protocol component of an InternetPassword.

PublicKeyHash

Public key hash

SecurityDomain

Security domain for InternetPassword items.

SerialNumber

Serial number for the certificate.

Server

Server component for an InternetPassword

Service

Service associated with an InternetPassword.

Subject

X.500 Subject name stored as an NSData.

SubjectKeyID

SubjectKeyID of the certificate.

Synchronizable
SynchronizableAny
SyncViewHint
TokenID
UseNoAuthenticationUI

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

UseOperationPrompt

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

ValueData

The value data to store.

Methods

Clone()

Makes a copy of this SecRecord.

Dispose()

Releases the resources used by the SecRecord object.

Dispose(Boolean)

Releases the resources used by the SecRecord object.

Finalize()

Finalizer for the SecRecord object

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

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

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

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

ToDictionary()

Applies to

See also