Sdílet prostřednictvím


IdentityCredential.Delete(Byte[]) Method

Definition

Deletes a credential.

[Android.Runtime.Register("delete", "([B)[B", "GetDelete_arrayBHandler", ApiSince=31)]
public virtual byte[] Delete (byte[] challenge);
[<Android.Runtime.Register("delete", "([B)[B", "GetDelete_arrayBHandler", ApiSince=31)>]
abstract member Delete : byte[] -> byte[]
override this.Delete : byte[] -> byte[]

Parameters

challenge
Byte[]

is a non-empty byte array whose contents should be unique, fresh and provided by the issuing authority. The value provided is embedded in the generated CBOR and enables the issuing authority to verify that the returned proof is fresh. Implementations are required to support challenges at least 32 bytes of length.

Returns

Byte[]

the COSE_Sign1 data structure above

Attributes

Remarks

Deletes a credential.

This method returns a COSE_Sign1 data structure signed by the CredentialKey with payload set to ProofOfDeletion as defined below.

ProofOfDeletion = [
                     "ProofOfDeletion",            ; tstr
                     tstr,                         ; DocType
                     bstr,                         ; Challenge
                     bool                          ; true if this is a test credential, should
                                                   ; always be false.
                 ]

This is only implemented in feature version 202101 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.IdentityCredential.delete(byte[]).

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