Security.SecKeyChain.QueryAsData Method
Fetches an NSData record from the Keychain.

Syntax

public static Foundation.NSData QueryAsData (SecRecord query)

Parameters

query
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 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.

Requirements

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