9.13.3.4.52. Function Se05x_API_MACOneShot_G¶
Defined in File se05x_APDU_apis.h
9.13.3.4.52.1. Function Documentation¶
-
smStatus_t
Se05x_API_MACOneShot_G(pSe05xSession_t session_ctx, uint32_t objectID, uint8_t macOperation, const uint8_t *inputData, size_t inputDataLen, uint8_t *macValue, size_t *pmacValueLen)¶ Se05x_API_MACOneShot_G
Generate. See Se05x_API_MACOneShot_V for Verfiication.
Performs a MAC operation in one shot (without keeping state).
The 4-byte identifier of the key must refer to an AESKey, DESKey or HMACKey.
Command to Applet
Field
Value
Description
CLA
0x80
INS
INS_CRYPTO
P1
P1_MAC
See
SE05x_P1_tP2
P2_GENERATE_ONESHOT or P2_VALIDATE_ONESHOT
See
SE05x_P2_tLc
#(Payload)
Payload
TLV[TAG_1]
4-byte identifier of the key object.
TLV[TAG_2]
1-byte
MACAlgoRefTLV[TAG_3]
Byte array containing data to be taken as input to MAC.
TLV[TAG_5]
MAC to verify (when P2=P2_VALIDATE_ONESHOT)
Le
0x00
Expecting MAC or Result.
R-APDU Body
Value
Description
TLV[TAG_1]
MAC value (P2=P2_GENERATE_ONESHOT) or
SE05x_Result_t(when p2=P2_VALIDATE_ONESHOT).R-APDU Trailer
SW
Description
SW_NO_ERROR
The command is handled successfully.
- Parameters
[in] session_ctx: Session Context [0:kSE05x_pSession][in] objectID: objectID [1:kSE05x_TAG_1][in] macOperation: macOperation [2:kSE05x_TAG_2][in] inputData: inputData [3:kSE05x_TAG_3][in] inputDataLen: Length of inputData[out] macValue: [0:kSE05x_TAG_1][inout] pmacValueLen: Length for macValue
