Skip to content

Commit

Permalink
Format files.
Browse files Browse the repository at this point in the history
  • Loading branch information
ple13 committed Dec 19, 2023
1 parent 3537d59 commit 6a01d5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/main/cc/any_sketch/crypto/secret_share_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "any_sketch/crypto/secret_share_generator.h"

#include <memory>
#include <string>

#include "absl/status/status.h"
Expand Down
5 changes: 2 additions & 3 deletions src/main/cc/math/open_ssl_uniform_random_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@ OpenSslUniformPseudorandomGenerator::GenerateUniformRandomRange(
// To get current_size `good` elements, it is expected to sample
// 1 + current_size*(1 + failure_rate/(1-failure_rate)) elements in
// [0, 2^{bit_length}).
uint64_t sample_size =
(uint64_t)(current_size + 1 +
failure_rate * current_size / (1 - failure_rate));
uint64_t sample_size = static_cast<uint64_t>(
current_size + 1.0 + failure_rate * current_size / (1 - failure_rate));

ASSIGN_OR_RETURN(std::vector<unsigned char> arr,
GeneratePseudorandomBytes(sample_size * bytes_per_value));
Expand Down

0 comments on commit 6a01d5b

Please sign in to comment.