XSecure_Sha3PadSelection - XSecure_Sha3PadSelection - 2026.1 English - UG643

Standalone Library Documentation: BSP and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2026-06-23
Version
2026.1 English

This function provides an option to select the SHA-3 padding type to be used while calculating the hash.

Note: The default provides support for NIST SHA-3. To change the padding to Keccak SHA-3, call this function after XSecure_Sha3Initialize().

Prototype

s32 XSecure_Sha3PadSelection(XSecure_Sha3 *InstancePtr, XSecure_Sha3PadType Sha3PadType);

Parameters

The following table lists the XSecure_Sha3PadSelection function arguments.

Table 1. XSecure_Sha3PadSelection Arguments
Name Description
InstancePtr Pointer to the XSecure_Sha3 instance.
Sha3PadType Type of SHA3 padding:
  • For NIST SHA-3 padding - XSECURE_CSU_NIST_SHA3
  • For KECCAK SHA-3 padding - XSECURE_CSU_KECCAK_SHA3

Returns

  • XST_SUCCESS if pad selection is successful.
  • XST_FAILURE if pad selecction is failed.