Skip to content

Commit

Permalink
Internal Code Change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 595321177
Change-Id: I6315e3da78edfb611c45cf4e6bcc11ff21f37c21
  • Loading branch information
ise-crypto authored and copybara-github committed Jan 3, 2024
1 parent 1b8bf2f commit e98f7fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/mac/mac_cli.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ Status MacCli(absl::string_view mode, const std::string keyset_filename,
// Read the authentication tag from tag file.
StatusOr<std::string> tag_result = ReadFile(tag_filename);
if (!tag_result.ok()) {
std::cerr << tag_result.status().message() << std::endl;
std::cerr << tag_result.status().message() << '\n';
exit(1);
}
// Verify authentication tag.
Status verify_result =
(*mac_primitive)->VerifyMac(*tag_result, *data_file_content);
if (verify_result.ok()) std::clog << "Verification succeeded!" << std::endl;
if (verify_result.ok()) std::clog << "Verification succeeded!" << '\n';
return verify_result;
}
}
Expand All @@ -128,10 +128,10 @@ int main(int argc, char** argv) {

std::clog << "Using keyset from file '" << keyset_filename << "' to " << mode
<< " authentication tag from file '" << tag_filename
<< "' for data file '" << data_filename << "'." << std::endl;
<< "' for data file '" << data_filename << "'." << '\n';
std::clog << "The tag will be "
<< ((mode == kCompute) ? "written to" : "read from") << " file '"
<< tag_filename << "'." << std::endl;
<< tag_filename << "'." << '\n';

CHECK_OK(tink_cc_examples::MacCli(mode, keyset_filename, data_filename,
tag_filename));
Expand Down

0 comments on commit e98f7fb

Please sign in to comment.