iOS Guides | Samples

Security.SecRecord Class

Tracks a set of properties from the keychain.

See Also: SecRecord

Syntax

public class SecRecord : IDisposable

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:

C# Example

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

Related content

Requirements

Namespace: Security
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0

The members of Security.SecRecord are listed below.

See Also: Object

Public Constructors

Public Properties

AccessControlSecAccessControl. Access control for the item.
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.
AuthenticationContextLAContext.
AuthenticationTypeSecAuthenticationType. The authentication type.
AuthenticationUISecAuthenticationUI.
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.
[read-only]
CertificateEncodingNSNumber. The encoding used for the certificate.
[read-only]
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.
IsExtractableBoolean.
IsNegativeBoolean. Whether there is a valid password associated.
IsPermanentBoolean.
IsSensitiveBoolean.
[read-only]
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
MatchEmailAddressIfPresentString.
MatchIssuersNSData[].
MatchItemListSecKeyChain[].
MatchPolicySecPolicy.
MatchSubjectContainsString.
MatchTrustedOnlyBoolean.
MatchValidOnDateNSDate.
ModificationDateNSDate.
PathString. Path component of an InternetPassword.
PersistentReferenceBoolean.
PortInt32. Port component of an InternetPassword
ProtocolSecProtocol. Protocol component of an InternetPassword.
[read-only]
PublicKeyHashNSData. Public key hash
SecurityDomainString. Security domain for InternetPassword items.
[read-only]
SerialNumberNSData. Serial number for the certificate.
ServerString. Server component for an InternetPassword
ServiceString. Service associated with an InternetPassword.
[read-only]
SubjectString. X.500 Subject name stored as an NSData.
[read-only]
SubjectKeyIDNSData. SubjectKeyID of the certificate.
SynchronizableBoolean.
SynchronizableAnyBoolean.
SyncViewHintString.
TokenIDSecTokenID.
UseNoAuthenticationUIBoolean. Developers should not use this deprecated property. Developers should use AuthenticationUI property
UseOperationPromptString. User facing description of the kind of authentication that the application is trying to perform
ValueDataNSData. The value data to store.

Public Methods

Clone() : SecRecord
Makes a copy of this SecRecord.
Dispose()
Releases the resources used by the SecRecord object.
Finalize()
Finalizer for the SecRecord object
GetCertificate() : SecCertificate
GetIdentity() : SecIdentity
GetKey() : SecKey
GetValueRef<T>() : 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() : NSDictionary

Protected Methods

Dispose(Boolean)
Releases the resources used by the SecRecord object.