diff options
author | Thai Duong <thaidn@google.com> | 2017-05-25 21:41:05 -0700 |
---|---|---|
committer | Thai Duong <thaidn@google.com> | 2017-05-26 10:03:57 -0700 |
commit | 2675d26052f185611c4d9d6fd6535db67bdc4763 (patch) | |
tree | 98ed1266a67e821b6d68f4911f47a63ac18729bc /cc/primitive_set.h | |
parent | 52402180aacd24e3d3ed994f8acf502cc39fa01f (diff) | |
download | tink-2675d26052f185611c4d9d6fd6535db67bdc4763.tar.gz |
Move C++ to google::crypto::tink.
Change-Id: I115b64a1d4a3e4eadb330ed707c9206efd42ae31
ORIGINAL_AUTHOR=Thai Duong <thaidn@google.com>
GitOrigin-RevId: 58c9c7744df883bbbe906d3928027607208a7d1a
Diffstat (limited to 'cc/primitive_set.h')
-rw-r--r-- | cc/primitive_set.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/cc/primitive_set.h b/cc/primitive_set.h index 5adf724ab..b74a79adf 100644 --- a/cc/primitive_set.h +++ b/cc/primitive_set.h @@ -27,7 +27,6 @@ #include "google/protobuf/stubs/stringpiece.h" #include "proto/tink.pb.h" -namespace cloud { namespace crypto { namespace tink { @@ -58,7 +57,7 @@ class PrimitiveSet { public: Entry(std::unique_ptr<P2> primitive, google::protobuf::StringPiece identifier, - google::cloud::crypto::tink::KeyStatusType status) : + google::crypto::tink::KeyStatusType status) : primitive_(std::move(primitive)), identifier_(identifier.ToString()), status_(status) { @@ -69,13 +68,13 @@ class PrimitiveSet { const std::string& get_identifier() const { return identifier_; } - const google::cloud::crypto::tink::KeyStatusType get_status() const { + const google::crypto::tink::KeyStatusType get_status() const { return status_; } private: std::unique_ptr<P> primitive_; std::string identifier_; - google::cloud::crypto::tink::KeyStatusType status_; + google::crypto::tink::KeyStatusType status_; }; typedef std::vector<Entry<P>> Primitives; @@ -86,7 +85,7 @@ class PrimitiveSet { // Adds 'primitive' to this set for the specified 'key'. util::StatusOr<Entry<P>*> AddPrimitive( std::unique_ptr<P> primitive, - google::cloud::crypto::tink::Keyset::Key key) { + google::crypto::tink::Keyset::Key key) { auto identifier_result = CryptoFormat::get_output_prefix(key); if (!identifier_result.ok()) return identifier_result.status(); std::string identifier = identifier_result.ValueOrDie(); @@ -135,6 +134,5 @@ class PrimitiveSet { } // namespace tink } // namespace crypto -} // namespace cloud #endif // TINK_PRIMITIVE_SET_H_ |