dynamic loading of network stack no longer needed

This commit is contained in:
Joseph Henry
2017-04-06 19:16:01 -07:00
parent 997f12a592
commit 08cca3c7aa
463 changed files with 136513 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
/*********************************************************************
* PicoTCP. Copyright (c) 2015 Altran Intelligent Systems. Some rights reserved.
* See LICENSE and COPYING for usage.
*
* Authors: Daniele Lacamera
* *********************************************************************/
#include <pico_md5.h>
#if defined (PICO_SUPPORT_CYASSL)
#include <cyassl/ctaocrypt/md5.h>
void pico_md5sum(uint8_t *dst, const uint8_t *src, size_t len)
{
Md5 md5;
InitMd5(&md5);
Md5Update(&md5, src, len);
Md5Final(&md5, dst);
}
#elif defined (PICO_SUPPORT_POLARSSL)
#include <polarssl/md5.h>
void pico_md5sum(uint8_t *dst, const uint8_t *src, size_t len)
{
md5(src, len, dst);
}
#else
static void (*do_pico_md5sum)(uint8_t *dst, const uint8_t *src, size_t len);
void pico_md5sum(uint8_t *dst, const uint8_t *src, size_t len)
{
if (do_pico_md5sum) {
do_pico_md5sum(dst, src, len);
}
}
void pico_register_md5sum(void (*md5)(uint8_t *, const uint8_t *, size_t))
{
do_pico_md5sum = md5;
}
#endif