added version numbers for sodium and mbedtls
This commit is contained in:
parent
aa128411c9
commit
53b6a7dfc3
|
|
@ -144,7 +144,10 @@ void SRP6A::createPublicKey(){
|
||||||
void SRP6A::getPrivateKey(){
|
void SRP6A::getPrivateKey(){
|
||||||
|
|
||||||
uint8_t privateKey[32];
|
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);
|
mbedtls_mpi_read_binary(&b,privateKey,32);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
12
src/src.ino
12
src/src.ino
|
|
@ -3,6 +3,8 @@
|
||||||
// as well as compile and test from this point. This file is ignored when the library is included in other sketches.
|
// 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 "HomeSpan.h"
|
||||||
|
#include <sodium.h>
|
||||||
|
#include <mbedtls/version.h>
|
||||||
|
|
||||||
void setup() {
|
void setup() {
|
||||||
|
|
||||||
|
|
@ -10,6 +12,16 @@ void setup() {
|
||||||
|
|
||||||
homeSpan.setLogLevel(1);
|
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.setHostNameSuffix("-lamp1");
|
||||||
homeSpan.setPortNum(1201);
|
homeSpan.setPortNum(1201);
|
||||||
// homeSpan.setMaxConnections(6);
|
// homeSpan.setMaxConnections(6);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue