3.1.4.16 ICM_SetUserInitialHashValue Function

C

void ICM_SetUserInitialHashValue (uint32_t *pValue);

Summary

Sets the initial hash value.

Description

Sets the initial hash value. Only valid if userHash is enabled in the ICM_CONFIG data structure.

Precondition

None.

Parameters

ParametersDescription
pValuePointer to the initial hash value

Returns

None.

Example

ICM_CONFIG icmConfig;

ICM_GetConfiguration (&icmConfig);
icmConfig.userHash = true;
icmConfig.userAlgo = ICM_SHA_1;
ICM_SetConfiguration (&icmConfig);
ICM_SetUserInitialHashValue(&userInitialHashValue);

Remarks

Table 3-3. Example of Initial Value for SHA-1 Algorithm
Register AddressAddress Offset / Byte Lane
0x3 / 31:240x2 / 23:160x1 / 15:80x0 / 7:0
0x000 ICM_UIHVAL001234567
0x004 ICM_UIHVAL189abcdef
0x008 ICM_UIHVAL2fedcba98
0x00C ICM_UIHVAL376543210
0x010 ICM_UIHVAL4f0e1d2c3