aboutsummaryrefslogtreecommitdiff
path: root/cc/registry.h
diff options
context:
space:
mode:
authorThai Duong <thaidn@google.com>2017-05-25 21:41:05 -0700
committerThai Duong <thaidn@google.com>2017-05-26 10:03:57 -0700
commit2675d26052f185611c4d9d6fd6535db67bdc4763 (patch)
tree98ed1266a67e821b6d68f4911f47a63ac18729bc /cc/registry.h
parent52402180aacd24e3d3ed994f8acf502cc39fa01f (diff)
downloadtink-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/registry.h')
-rw-r--r--cc/registry.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/cc/registry.h b/cc/registry.h
index 7bff1141d..58d9b81a9 100644
--- a/cc/registry.h
+++ b/cc/registry.h
@@ -31,7 +31,6 @@
#include "google/protobuf/stubs/stringpiece.h"
#include "proto/tink.pb.h"
-namespace cloud {
namespace crypto {
namespace tink {
@@ -78,7 +77,7 @@ class Registry {
// and calls manager's GetPrimitive(key_data)-method.
template <class P>
util::StatusOr<std::unique_ptr<P>> GetPrimitive(
- const google::cloud::crypto::tink::KeyData& key_data);
+ const google::crypto::tink::KeyData& key_data);
// Creates a set of primitives corresponding to the keys with
// (status == ENABLED) in the keyset given in 'keyset_handle',
@@ -169,7 +168,7 @@ util::StatusOr<const KeyManager<P>*> Registry::get_key_manager(
template <class P>
util::StatusOr<std::unique_ptr<P>> Registry::GetPrimitive(
- const google::cloud::crypto::tink::KeyData& key_data) {
+ const google::crypto::tink::KeyData& key_data) {
auto key_manager_result = get_key_manager<P>(key_data.type_url());
if (key_manager_result.ok()) {
return key_manager_result.ValueOrDie()->GetPrimitive(key_data);
@@ -183,9 +182,9 @@ util::StatusOr<std::unique_ptr<PrimitiveSet<P>>> Registry::GetPrimitives(
util::Status status = ValidateKeyset(keyset_handle.get_keyset());
if (!status.ok()) return status;
std::unique_ptr<PrimitiveSet<P>> primitives(new PrimitiveSet<P>());
- for (const google::cloud::crypto::tink::Keyset::Key& key
+ for (const google::crypto::tink::Keyset::Key& key
: keyset_handle.get_keyset().key()) {
- if (key.status() == google::cloud::crypto::tink::KeyStatusType::ENABLED) {
+ if (key.status() == google::crypto::tink::KeyStatusType::ENABLED) {
std::unique_ptr<P> primitive;
if (custom_manager != nullptr &&
custom_manager->DoesSupport(key.key_data().type_url())) {
@@ -210,6 +209,5 @@ util::StatusOr<std::unique_ptr<PrimitiveSet<P>>> Registry::GetPrimitives(
} // namespace tink
} // namespace crypto
-} // namespace cloud
#endif // TINK_REGISTRY_H_