Skip to content

Commit

Permalink
Update message name.
Browse files Browse the repository at this point in the history
  • Loading branch information
ple13 committed Mar 19, 2024
1 parent 8d909ce commit 8709469
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/main/cc/frequency_count/secret_share_generator_adapter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ namespace wfa::frequency_count {

absl::StatusOr<std::string> SecretShareFrequencyVector(
const std::string& serialized_request) {
ShareShuffleGeneratorRequest request_proto;
SecretShareGeneratorRequest request_proto;
if (!request_proto.ParseFromString(serialized_request)) {
return absl::InvalidArgumentError(
"failed to parse the ShareShuffleGeneratorRequest proto.");
"failed to parse the SecretShareGeneratorRequest proto.");
}
std::vector<uint32_t> frequency_vector = std::vector<uint32_t>(
request_proto.data().begin(), request_proto.data().end());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ option java_package = "org.wfanet.frequencycount";
option java_multiple_files = true;

// The request to encrypt a sketch.
message ShareShuffleGeneratorRequest {
message SecretShareGeneratorRequest {
uint32 ring_modulus = 1;
// The input frequency vector
repeated uint32 data = 2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ constexpr int kRingModulus = 128;

TEST(SecretShareJavaAdapterTest, EmptyFrequencyVectorFails) {
// Build the request
ShareShuffleGeneratorRequest request;
SecretShareGeneratorRequest request;
request.set_ring_modulus(kRingModulus);
std::vector<uint32_t> frequency_vector(0);

Expand All @@ -43,7 +43,7 @@ TEST(SecretShareJavaAdapterTest, EmptyFrequencyVectorFails) {

TEST(SecretShareJavaAdapterTest, InvalidRingModulusFails) {
// Build the request
ShareShuffleGeneratorRequest request;
SecretShareGeneratorRequest request;
request.set_ring_modulus(1);
std::vector<uint32_t> frequency_vector = {1, 2, 3, 4, 5};
request.mutable_data()->Add(frequency_vector.begin(), frequency_vector.end());
Expand All @@ -54,7 +54,7 @@ TEST(SecretShareJavaAdapterTest, InvalidRingModulusFails) {

TEST(SecretShareJavaAdapterTest, SecretShareGenerationSucceeds) {
// Build the request
ShareShuffleGeneratorRequest request;
SecretShareGeneratorRequest request;
request.set_ring_modulus(kRingModulus);
std::vector<uint32_t> frequency_vector = {1, 2, 3, 4, 5};
request.mutable_data()->Add(frequency_vector.begin(), frequency_vector.end());
Expand Down

0 comments on commit 8709469

Please sign in to comment.