added version numbers for sodium and mbedtls

This commit is contained in:
Gregg 2021-09-19 18:23:06 -05:00
parent aa128411c9
commit 53b6a7dfc3
2 changed files with 16 additions and 1 deletions

View File

@ -144,7 +144,10 @@ void SRP6A::createPublicKey(){
void SRP6A::getPrivateKey(){
uint8_t privateKey[32];
randombytes_buf(privateKey,16); // generate 32 random bytes using libsodium (which uses the ESP32 hardware-based random number generator)
randombytes_buf(privateKey,32); // generate 32 random bytes using libsodium (which uses the ESP32 hardware-based random number generator)
for(int i=0;i<32;i++)
privateKey[i]=i+1;
mbedtls_mpi_read_binary(&b,privateKey,32);
}

View File

@ -3,12 +3,24 @@
// as well as compile and test from this point. This file is ignored when the library is included in other sketches.
#include "HomeSpan.h"
#include <sodium.h>
#include <mbedtls/version.h>
void setup() {
Serial.begin(115200);
homeSpan.setLogLevel(1);
homeSpan.setStatusPin(5);
homeSpan.setControlPin(33);
Serial.println(sodium_version_string());
Serial.println(sodium_library_version_major());
Serial.println(sodium_library_version_minor());
char mb[64];
mbedtls_version_get_string_full(mb);
Serial.println(mb);
homeSpan.setHostNameSuffix("-lamp1");
homeSpan.setPortNum(1201);