mirror of
https://github.com/Fishwaldo/bl_mcu_sdk.git
synced 2025-07-16 17:58:28 +00:00
* use nuttx libc, disable system libc * use tlsf as default * update lhal flash driver * add example readme * add flash ini for new flash tool * add fw header for new flash tool
16 lines
356 B
C
Executable file
16 lines
356 B
C
Executable file
#include "arch_crypto.h"
|
|
#include "arch_dbg.h"
|
|
|
|
#include <mbedtls/aes.h>
|
|
#include <mbedtls/md5.h>
|
|
#include <stdint.h>
|
|
|
|
void arch_md5(uint8_t *input, int len, uint8_t hash[16])
|
|
{
|
|
mbedtls_md5_context context;
|
|
|
|
mbedtls_md5_init(&context);
|
|
mbedtls_md5_starts(&context);
|
|
mbedtls_md5_update(&context, input, len);
|
|
mbedtls_md5_finish(&context, hash);
|
|
}
|