SecKeyChain.QueryAsRecord Method

Definition

Overloads

QueryAsRecord(SecRecord, SecStatusCode)

Fetches a single SecRecord.

QueryAsRecord(SecRecord, Int32, SecStatusCode)

Fetches one or more SecRecords.

QueryAsRecord(SecRecord, SecStatusCode)

Fetches a single SecRecord.

public static Security.SecRecord QueryAsRecord (Security.SecRecord query, out Security.SecStatusCode result);
static member QueryAsRecord : Security.SecRecord *  -> Security.SecRecord

Parameters

query
SecRecord

The query used to lookup the value on the keychain.

result
SecStatusCode

Returns the status code from calling SecItemCopyMatching.

Returns

Returns a stronglty typed SecRecord.

Remarks

Unlike the QueryAsData(SecRecord, Boolean, Int32, SecStatusCode) methods which return a binary blob inside an NSData, this returns a strongly typed SecRecord that you can easily inspect.

This is the strongly typed equivalent of calling the Security's framework SecItemCopyMatching method with the kSecReturnData set to true, kSecReturnAttributes set to true and kSecMatchLimit set to 1, forcing a single record to be returned.

Applies to

QueryAsRecord(SecRecord, Int32, SecStatusCode)

Fetches one or more SecRecords.

public static Security.SecRecord[] QueryAsRecord (Security.SecRecord query, int max, out Security.SecStatusCode result);
static member QueryAsRecord : Security.SecRecord * int *  -> Security.SecRecord[]

Parameters

query
SecRecord

The query used to lookup the value on the keychain.

max
Int32

Maximum number of values to return.

result
SecStatusCode

Returns the status code from calling SecItemCopyMatching.

Returns

Returns an array of strongly typed SecRecord objects.

Remarks

Unlike the QueryAsData(SecRecord, Boolean, Int32, SecStatusCode) methods which return a binary blob inside an NSData, this returns a strongly typed SecRecord that you can easily inspect.

This is the strongly typed equivalent of calling the Security's framework SecItemCopyMatching method with the kSecReturnData set to true, kSecReturnAttributes set to true and kSecMatchLimit set to max, which returns at most that many records.

Applies to