cancel
Showing results for 
Search instead for 
Did you mean: 

Using MD5 Hash on stm32f417

jdcowpland
Associate II
Posted on April 03, 2014 at 13:08

Hey guys,

I'm trying to calculate a md5 hash on a string I've got and I'm calling the function:

HASH_MD5((uint8_t *)buffer, size, Md5output);

where size is the size of the buffer. But the Md5output is empty after execution. Is there something I'm missing other than that line? The only other thing I've done is enable the clock:

RCC_AHB2PeriphClockCmd(RCC_AHB2Periph_HASH, ENABLE);
5 REPLIES 5
jdcowpland
Associate II
Posted on April 03, 2014 at 13:16

Bit of extra info:

the buffer is defined as a string and contains the text ''042ACE880483B3\r\n03.04.2014 12:12:20\r\n'' The result of the HASH_MD5 is success so not quite sure what is going on. Md5output is defined as uint8_t Md5output[16] and size is an integer 37.

jdcowpland
Associate II
Posted on April 07, 2014 at 09:55

Has no one had any experience with the hash library?

Amel NASRI
ST Employee
Posted on April 08, 2014 at 12:04

There is an example within the STM32F4 Standard peripheral library (Project\STM32F4xx_StdPeriph_Examples\HASH\HASH_SHA1_MD5). You can try it & check if you still have an issue.

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Posted on April 08, 2014 at 17:03

Is there something I'm missing other than that line?

Is the PLL running? The HASH unit clocks off the 48 MHz Q Tap
Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Posted on April 08, 2014 at 17:18

From an F215

---------------------------------------
MD5 Hash Data:
---------------------------------------
02 93 21 E4 4A DD 8C 0D 11 DF 8B DA 66 21 10 7C 

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