1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-13 13:01:55 +03:00

* Added SHA256

* Return code checked for get_random()
* MD2 code removed.

git-svn-id: svn://svn.code.sf.net/p/axtls/code/trunk@238 9a5d90b5-6617-0410-8a86-bb477d3ed2e3
This commit is contained in:
cameronrich
2014-11-19 03:51:22 +00:00
parent 9ef84f9234
commit 82a7638efa
15 changed files with 531 additions and 288 deletions

View File

@ -121,7 +121,12 @@ int main(int argc, char *argv[])
}
RNG_initialize();
get_random(MD5_SIZE, md5_salt);
if (get_random(MD5_SIZE, md5_salt) < 0)
{
fprintf(stderr, "Can't get random data\n" );
exit(1);
}
RNG_terminate();
base64_encode(md5_salt, MD5_SIZE, b64_salt, sizeof(b64_salt));