cancel
Showing results for 
Search instead for 
Did you mean: 

Does the STM32CubeIDE have a truncate function?

stmmm
Associate II

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?

1 REPLY 1
Piranha
Chief II

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.