lbeatu/SHA-1-Encryption-STM32F429-and-Algoritm-C ? reverse-engineered prompt

Reverse engineered prompt

Build me a small STM32 project that calculates SHA 1 and prints the result over USART1.

I want it to run on an STM32F429 board using the standard peripheral library, with the serial port set up for 115200, 8 data bits, 1 stop bit, no parity, no flow control. Use PA9 and PA10 for USART1, and if possible flash or toggle the onboard LEDs on PG13 and PG14 to show the program is alive.

The main thing I need is a clean C implementation of SHA 1 that takes a sample message, hashes it, and sends the digest to the terminal in a readable format. Please keep the code simple and easy to follow, since this is for learning and demonstration. If there’s anything missing or unclear, look up the current STM32 standard peripheral library docs online and fill in the gaps. Make sure it builds cleanly and include any setup needed in the main file and interrupt or system files so it can run on the STM32F429 board.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab