Share via


CredentialDataResult.GetDeviceSignature Method

Definition

Returns a signature over the DeviceAuthenticationBytes CBOR specified in #getDeviceNameSpaces(), to prove to the reader that the data is from a trusted credential.

[Android.Runtime.Register("getDeviceSignature", "()[B", "GetGetDeviceSignatureHandler", ApiSince=34)]
public virtual byte[]? GetDeviceSignature ();
[<Android.Runtime.Register("getDeviceSignature", "()[B", "GetGetDeviceSignatureHandler", ApiSince=34)>]
abstract member GetDeviceSignature : unit -> byte[]
override this.GetDeviceSignature : unit -> byte[]

Returns

Byte[]

A COSE_Sign1 structure as described above or null if the conditions specified above are not met.

Attributes

Remarks

Returns a signature over the DeviceAuthenticationBytes CBOR specified in #getDeviceNameSpaces(), to prove to the reader that the data is from a trusted credential.

The signature is made using the authentication private key. See section 9.1.3.4 of ISO/IEC 18013-5:2021 for details of this operation.

If the session transcript or reader ephemeral key wasn't set on the PresentationSession used to obtain this data no signature will be produced and this method will return null.

This is only implemented in feature version 202301 or later. If not implemented, the call fails with UnsupportedOperationException. See android.content.pm.PackageManager#FEATURE_IDENTITY_CREDENTIAL_HARDWARE for known feature versions.

Java documentation for android.security.identity.CredentialDataResult.getDeviceSignature().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to