Upravit

Sdílet prostřednictvím


SecKeyChain.QueryAsData Method

Definition

Overloads

QueryAsData(SecRecord, Boolean, Int32, SecStatusCode)

Fetches a set of NSData records from the Keychain.

QueryAsData(SecRecord, Boolean, SecStatusCode)

Fetches a set of NSData records from the Keychain.

QueryAsData(SecRecord)

Fetches an NSData record from the Keychain.

QueryAsData(SecRecord, Int32)

Fetches a set of NSData records from the Keychain.

QueryAsData(SecRecord, Boolean, Int32, SecStatusCode)

Fetches a set of NSData records from the Keychain.

public static Foundation.NSData[] QueryAsData (Security.SecRecord query, bool wantPersistentReference, int max, out Security.SecStatusCode status);
static member QueryAsData : Security.SecRecord * bool * int *  -> Foundation.NSData[]

Parameters

query
SecRecord

The query used to lookup the value on the keychain.

wantPersistentReference
Boolean

If set to true, the returned NSData can be stored on disk for later used, or shared between processes.

max
Int32

Maximum number of values to return.

status
SecStatusCode

Returns the status code from calling SecItemCopyMatching.

Returns

NSData[]

An array of NSData records associated with the given query.

Remarks

The returned NSData is a binary blob, if you want to get a high-level representation, use M:Security.SecKeyChain.QueryAsRecord* instead.

This is the strongly typed equivalent of calling the Security's framework SecItemCopyMatching method with the kSecReturnData set to true and kSecMatchLimit set to the value of max, forcing that many record to be returned. If wantPersistentReference is true, this also sets the kSecReturnPersistentRef dictionary key to true.

Applies to

QueryAsData(SecRecord, Boolean, SecStatusCode)

Fetches a set of NSData records from the Keychain.

public static Foundation.NSData QueryAsData (Security.SecRecord query, bool wantPersistentReference, out Security.SecStatusCode status);
static member QueryAsData : Security.SecRecord * bool *  -> Foundation.NSData

Parameters

query
SecRecord

The query used to lookup the value on the keychain.

wantPersistentReference
Boolean

If set to true, the returned NSData can be stored on disk for later used, or shared between processes.

status
SecStatusCode

Returns the status code from calling SecItemCopyMatching.

Returns

The NSData associated with the given query.

Remarks

The returned NSData is a binary blob, if you want to get a high-level representation, use M:Security.SecKeyChain.QueryAsRecord* instead.

This is the strongly typed equivalent of calling the Security's framework SecItemCopyMatching method with the kSecReturnData set to true and kSecMatchLimit to 1, forcing a single record to be returned. If wantPersistentReference is true, this also sets the kSecReturnPersistentRef dictionary key to true.

Applies to

QueryAsData(SecRecord)

Fetches an NSData record from the Keychain.

public static Foundation.NSData QueryAsData (Security.SecRecord query);
static member QueryAsData : Security.SecRecord -> Foundation.NSData

Parameters

query
SecRecord

The query used to lookup the value on the keychain.

Returns

The NSData associated with the given query.

Remarks

The returned NSData is a binary blob, if you want to get a high-level representation, use M:Security.SecKeyChain.QueryAsRecord* instead.

The returned NSData is not suitable for storing on disk or passing to another process. If you want that, you should use the overload that takes the bool wantPersistentReference parameter and set that to true.

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

Applies to

QueryAsData(SecRecord, Int32)

Fetches a set of NSData records from the Keychain.

public static Foundation.NSData[] QueryAsData (Security.SecRecord query, int max);
static member QueryAsData : Security.SecRecord * int -> Foundation.NSData[]

Parameters

query
SecRecord

The query used to lookup the value on the keychain.

max
Int32

Maximum number of values to return.

Returns

NSData[]

An array of NSData records associated with the given query.

Remarks

The returned NSData is a binary blob, if you want to get a high-level representation, use M:Security.SecKeyChain.QueryAsRecord* instead.

The returned NSData is not suitable for storing on disk or passing to another process. If you want that, you should use the overload that takes the bool wantPersistentReference parameter and set that to true.

This is the strongly typed equivalent of calling the Security's framework SecItemCopyMatching method with the kSecReturnData set to true and kSecMatchLimit set to the value of max, forcing that many record to be returned.

Applies to