2023-03-03 01:41 PM
I am working with a Nucleo-L476RG board, and I am writing a program that generates HMAC-SHA-256 values. I want to truncate the output of the generated HMAC value to only output n amount of bits. For example, if my generated HMAC value is 80 bits, I want to truncate the value to output the 40 leftmost bits of data. Is there a function that can easily do this?
2023-03-11 12:28 PM
Then just take the first 5 bytes from the 10 in total. It's called the basics of programming. And IDE doesn't provide any functions for code. Functions are provided by C standard library, other libraries and you, the developer.