11.12.3.4.81. Function Se05x_API_DigestOneShot

11.12.3.4.81.1. Function Documentation

smStatus_t Se05x_API_DigestOneShot(pSe05xSession_t session_ctx, uint8_t digestMode, const uint8_t *inputData, size_t inputDataLen, uint8_t *hashValue, size_t *phashValueLen)

Se05x_API_DigestOneShot

Performs a hash operation in one shot (without context).

Command to Applet

Field

Value

Description

CLA

0x80

INS

INS_CRYPTO

See SE05x_INS_t

P1

P1_DEFAULT

See SE05x_P1_t

P2

P2_ONESHOT

See SE05x_P2_t

Lc

#(Payload)

TLV[TAG_1]

1-byte DigestMode (except DIGEST_NO_HASH)

TLV[TAG_2]

Data to hash.

Le

0x00

TLV expecting hash value

R-APDU Body

Value

Description

TLV[TAG_1]

Hash value.

R-APDU Trailer

SW

Description

SW_NO_ERROR

The hash is created successfully.

Parameters
  • [in] session_ctx: Session Context [0:kSE05x_pSession]

  • [in] digestMode: digestMode [1:kSE05x_TAG_1]

  • [in] inputData: inputData [2:kSE05x_TAG_2]

  • [in] inputDataLen: Length of inputData

  • [out] hashValue: [0:kSE05x_TAG_1]

  • [inout] phashValueLen: Length for hashValue