cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 md5 hash

zavodny
Associate II
Posted on February 19, 2014 at 21:38

Hi, I've problem with generating md5 hash. I use library from ST. It's called stm32f4xx_hash_md5.c and I call function HASH_MD5(PASS, 4, PASS_MD5). In PASS_MD5 I need hash. But the variable is empty. 

Can you help me, please?
3 REPLIES 3
Posted on February 19, 2014 at 21:48

What SPECIFIC STM32F4xx part are you using? Because the most generally available parts don't have a HASH/CRYPT unit.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
zavodny
Associate II
Posted on February 19, 2014 at 21:51

I use STM32F4 Discovery kit with STM32F407VG.

Posted on February 19, 2014 at 22:01

Then you'll need to swap out that part for a F417

RCC->AHB2ENR |= RCC_AHB2Periph_CRYP | RCC_AHB2Periph_HASH | RCC_AHB2Periph_RNG;
if (RCC->AHB2ENR & RCC_AHB2Periph_CRYP)
puts(''Crypto Unit Present'');
if (RCC->AHB2ENR & RCC_AHB2Periph_HASH)
puts(''Hashing Unit Present'');
if (RCC->AHB2ENR & RCC_AHB2Periph_RNG)
puts(''Random Number Generator Unit Present'');

0690X000006053UQAQ.png
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..