ResultData.GetMessageAuthenticationCode Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a message authentication code over the DeviceAuthenticationBytes
CBOR
specified in #getAuthenticatedData()
, to prove to the reader that the data
is from a trusted credential.
[Android.Runtime.Register("getMessageAuthenticationCode", "()[B", "GetGetMessageAuthenticationCodeHandler", ApiSince=30)]
public abstract byte[]? GetMessageAuthenticationCode ();
[<Android.Runtime.Register("getMessageAuthenticationCode", "()[B", "GetGetMessageAuthenticationCodeHandler", ApiSince=30)>]
abstract member GetMessageAuthenticationCode : unit -> byte[]
Returns
A COSE_Mac0 structure with the message authentication code as described above
or null
if the conditions specified above are not met.
- Attributes
Remarks
Returns a message authentication code over the DeviceAuthenticationBytes
CBOR specified in #getAuthenticatedData()
, to prove to the reader that the data is from a trusted credential.
The MAC proves to the reader that the data is from a trusted credential. This code is produced by using the key agreement and key derivation function from the ciphersuite with the authentication private key and the reader ephemeral public key to compute a shared message authentication code (MAC) key, then using the MAC function from the ciphersuite to compute a MAC of the authenticated data. See section 9.2.3.5 of ISO/IEC 18013-5 for details of this operation.
If the sessionTranscript
parameter passed to IdentityCredential#getEntries(byte[], Map, byte[], byte[])
was null
or the reader ephmeral public key was never set using IdentityCredential#setReaderEphemeralPublicKey(PublicKey)
, no message authencation code will be produced and this method will return null
.
Java documentation for android.security.identity.ResultData.getMessageAuthenticationCode()
.
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.