proveOwnership

open fun proveOwnership(@NonNull challenge: Array<Byte>): Array<Byte>

Proves ownership of a credential.

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

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

This is only implemented on FEATURE_VERSION_202101, fails with UnsupportedOperationException if using a store with a lesser version.

Return

the COSE_Sign1 data structure above

Parameters

challenge

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.