Skip to content

Commit

Permalink
Minor fixes to C++ documentation.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 198841818
GitOrigin-RevId: 9d6b3859e704b9b781b6312f30c900e8c98ffcda
  • Loading branch information
przydatek authored and Tink Team committed Jun 6, 2018
1 parent d0b2367 commit 85ca63f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion cc/keyset_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@
namespace crypto {
namespace tink {

// KeysetReader
// KeysetReader knows how to read a Keyset or an EncryptedKeyset
// from some source.
class KeysetReader {
public:
// Reads and returns a (cleartext) Keyset object from the underlying source.
virtual crypto::tink::util::StatusOr<
std::unique_ptr<google::crypto::tink::Keyset>>
Read() = 0;

// Reads and returns an EncryptedKeyset object from the underlying source.
virtual crypto::tink::util::StatusOr<
std::unique_ptr<google::crypto::tink::EncryptedKeyset>>
ReadEncrypted() = 0;
Expand Down
5 changes: 4 additions & 1 deletion cc/keyset_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@
namespace crypto {
namespace tink {

// KeysetWriter
// KeysetWriter knows how to write a Keyset or an EncryptedKeyset
// to some storage system.
class KeysetWriter {
public:
// Writes 'keyset' to the underlying storage system.
virtual crypto::tink::util::Status
Write(const google::crypto::tink::Keyset& keyset) = 0;

// Writes 'encrypted_keyset' to the underlying storage system.
virtual crypto::tink::util::Status
Write(const google::crypto::tink::EncryptedKeyset& encrypted_keyset) = 0;

Expand Down
2 changes: 1 addition & 1 deletion examples/helloworld/cc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ echo "some plaintext" > foo.txt
encrypt foo.txt "some aad" bar.encrypted
./bazel-bin/examples/helloworld/cc/hello_world ./examples/helloworld/cc/aes128_gcm_test_keyset_json.txt\
decrypt bar.encrypted "some aad" foo-decrypted.txt
cat foo2.txt
cat foo-decrypted.txt
```

TODO: copy this app to
Expand Down

0 comments on commit 85ca63f

Please sign in to comment.