new cspot/bell

This commit is contained in:
philippe44
2023-05-06 23:50:26 +02:00
parent e0e7e718ba
commit 8bad480112
163 changed files with 6611 additions and 6739 deletions
@@ -1,8 +1,8 @@
#include "AuthChallenges.h"
#include <algorithm> // for copy
#include <climits> // for CHAR_BIT
#include <random> // for default_random_engine, independent_bits_en...
#include <algorithm> // for copy
#include <climits> // for CHAR_BIT
#include <random> // for default_random_engine, independent_bits_en...
#include "NanoPBHelper.h" // for pbPutString, pbEncode, pbDecode
#include "pb.h" // for pb_byte_t
@@ -94,9 +94,9 @@ std::vector<uint8_t> AuthChallenges::solveApHello(
// Get send and receive keys
this->shanSendKey = std::vector<uint8_t>(resultData.begin() + 0x14,
resultData.begin() + 0x34);
resultData.begin() + 0x34);
this->shanRecvKey = std::vector<uint8_t>(resultData.begin() + 0x34,
resultData.begin() + 0x54);
resultData.begin() + 0x54);
return pbEncode(ClientResponsePlaintext_fields, &clientResPlaintext);
}
@@ -125,5 +125,6 @@ std::vector<uint8_t> AuthChallenges::prepareClientHello() {
// Generate the random nonce
auto nonce = crypto->generateVectorWithRandomData(16);
std::copy(nonce.begin(), nonce.end(), clientHello.client_nonce);
return pbEncode(ClientHello_fields, &clientHello);
}
}