Mac Guides | Samples

MonoMac.Security.SecRecord Class

Tracks a set of properties from the keychain.

See Also: SecRecord


public class SecRecord : IDisposable


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:

C# Example

var query = new SecRecord (SecKind.InternetPassword) {
   Sever = "",
   Account = "miguel"
var password = SecKeyChain.QueryAsData (query);
Console.WriteLine ("The password for the account is: {0}", password);

Related content


Namespace: MonoMac.Security
Assembly: XamMac (in XamMac.dll)
Assembly Versions:

The members of MonoMac.Security.SecRecord are listed below.

See Also: Object

Public Constructors

Creates a keychain record.

Public Properties

AccessGroupString. Access group name.
AccessibleSecAccessible. When should the keychain information be accessed.
AccountString. Accout name.
ApplicationLabelString. An application-level tag, used to identify this key.
ApplicationTagNSData. To store your application data.
AuthenticationTypeSecAuthenticationType. The authentication type.
CanDecryptBoolean. Whether this cryptographic key can be used to decrypt data.
CanDeriveBoolean. Whether this key can be used to derive another key.
CanEncryptBoolean. Whether this cryptographic key can be used to encrypt data.
CanSignBoolean. Whether this key can be used to sign data.
CanUnwrapBoolean. Whether this key can be used to unwrap another key.
CanVerifyBoolean. Whether this key can be used to verify a digital signature.
CanWrapBoolean. Whether this key can be used to wrap another key.
CertificateEncodingNSNumber. The encoding used for the certificate.
CertificateTypeNSNumber. A certificate type.
CommentString. Used editable comment for this record.
CreationDateNSDate. Creation date for this item.
CreatorInt32. Creator key, a 32-bit value
CreatorTypeInt32. Item's type. 32-bit value.
DescriptionString. User visible description of this item.
EffectiveKeySizeInt32. Number of effective bits on the key.
GenericNSData. Generic password's NSData storage.
InvisibleBoolean. If set, the item is not displayed to the user.
IsNegativeBoolean. Whether there is a valid password associated
IssuerNSData. X.500 Issuer certificate name as an NSData block
KeyClassSecKeyClass. The key class.
KeySizeInBitsInt32. Bitsize for the key, contrast this with EffectiveKeySize.
KeyTypeSecKeyType. The key type.
LabelString. User visible label for this item.
MatchCaseInsensitiveBoolean. Whether matches should be case insensitive
PathString. Path component of an InternetPassword.
PortInt32. Port component of an InternetPassword
ProtocolSecProtocol. Protocol component of an InternetPassword
PublicKeyHashNSData. Public key hash
SecurityDomainString. Security domain for InternetPassword items.
SerialNumberNSData. Serial number for the certificate.
ServerString. Server component for an InternetPassword
ServiceString. Service associated with an InternetPassword.
SubjectString. X.500 Subject name stored as an NSData.
SubjectKeyIDNSData. SubjectKeyID of the certificate.
ValueDataNSData. The value data to store.

Public Methods

Clone() : SecRecord
Makes a copy of this SecRecord.
Releases the resourced used by the SecRecord object.
Releases the resourced used by the SecRecord object.
Finalizer for the SecRecord object