The STM32H7 MCU has a HW HASH engine. I want to use.
Does anybody has an example how to enable or how to use MCU HW HASH engine?
(as STM32_HAL code or even as Arduino Sketch)
Intention:
I have a large array with string-to-integer-relations, e.g. command keywords or symbolic register names which I want to translate into a related int number or the register address (as an uin32_t value).
Instead of doing an iteration over the huge two-dimensional array (string, value relations) and doing on
every entry a strcmp() just to find the matching keyword:
- I want to convert strings into a Hash value
- and now search just via Hash value (convert also the string looking for in the array to a hash)
- if the list is ordered (by Hash value) - I can use a Binary Search (iterate by comparing values, up or down)
A much faster implementation, esp. if strings are very long and array very huge.
Just to know if there is anything out there to start with MCU HW HASH.
Thank you.