Hash component. More...
Hash component.
The mcuxClOsccaSm3 component implements the Hash functionality supported by CLNS.
An example of how to use the mcuxClOsccaSm3 component can be found in /mcuxClOsccaSm3/ex.
The mcuxClOsccaSm3 component supports interfaces to either hash a message in one shot (mcuxClOsccaSm3_compute) or to hash it in parts (mcuxClOsccaSm3_init, mcuxClOsccaSm3_process, and mcuxClOsccaSm3_finish). In case of hashing a message in parts, first an initialization has to be performed (mcuxClOsccaSm3_init), followed by zero, one, or multiple updates (mcuxClOsccaSm3_process), followed by a finalization (mcuxClOsccaSm3_finish). The finalization generates the output data (digest) and destroys the context. After the finalization step, no further updates are possible.
The targeted hash algorithm is selected by passing one of the offered algorithm mode descriptors (mcuxClOsccaSm3_Modes), which are listed in file mcuxClOsccaSm3_Algorithms.h
Note: In case the hashing functionality is based on a hardware co-processor, it might be necessary to initialize the co-processor, before it's use in the mcuxClOsccaSm3 component. Please refer to the example for further information on this.