Pass array by reference in newhope speed test.
This is another thing that MSVC can't cope with: ..\tool\speed.cc(537) : error C2536: 'SpeedNewHope::<⋯>::SpeedNewHope::<⋯>::clientmsg' : cannot specify explicit initializer for arrays Change-Id: I6b4cb430895f7794e9cef1b1c12b57ba5d537c64
This commit is contained in:
parent
e75f0530a0
commit
7909aa7c23
@ -525,12 +525,12 @@ static bool SpeedNewHope(const std::string &selected) {
|
|||||||
uint8_t clientmsg[NEWHOPE_CLIENTMSG_LENGTH];
|
uint8_t clientmsg[NEWHOPE_CLIENTMSG_LENGTH];
|
||||||
RAND_bytes(clientmsg, sizeof(clientmsg));
|
RAND_bytes(clientmsg, sizeof(clientmsg));
|
||||||
|
|
||||||
if (!TimeFunction(&results, [sk, clientmsg]() -> bool {
|
if (!TimeFunction(&results, [sk, &clientmsg]() -> bool {
|
||||||
uint8_t server_key[SHA256_DIGEST_LENGTH];
|
uint8_t server_key[SHA256_DIGEST_LENGTH];
|
||||||
uint8_t servermsg[NEWHOPE_SERVERMSG_LENGTH];
|
uint8_t servermsg[NEWHOPE_SERVERMSG_LENGTH];
|
||||||
NEWHOPE_keygen(servermsg, sk);
|
NEWHOPE_keygen(servermsg, sk);
|
||||||
if (!NEWHOPE_server_compute_key(server_key, sk, clientmsg,
|
if (!NEWHOPE_server_compute_key(server_key, sk, clientmsg,
|
||||||
sizeof(clientmsg))) {
|
NEWHOPE_CLIENTMSG_LENGTH)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user