diff options
author | wconner <wconner@google.com> | 2023-04-13 13:41:10 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-04-13 13:42:05 -0700 |
commit | ebad71f486714432505f3338666fc05b7e4fb746 (patch) | |
tree | 6ff2ce2623f6e08bf8dfe05efa7c35802c1af040 /cc/keyset_handle_builder.h | |
parent | 7e08b9a021678670f16f6bf0579ad76b764b702a (diff) | |
download | tink-ebad71f486714432505f3338666fc05b7e4fb746.tar.gz |
Replace unique_ptr with shared_ptr in KeysetHandleBuilder::Entry API.
Also, return shared_ptr in KeysetHandle::Entry::GetKey().
PiperOrigin-RevId: 524090677
Diffstat (limited to 'cc/keyset_handle_builder.h')
-rw-r--r-- | cc/keyset_handle_builder.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/keyset_handle_builder.h b/cc/keyset_handle_builder.h index 5111ff3f4..72d3af8d8 100644 --- a/cc/keyset_handle_builder.h +++ b/cc/keyset_handle_builder.h @@ -57,7 +57,7 @@ class KeysetHandleBuilder { // Creates new KeysetHandleBuilder::Entry from a given `key`. Also, sets // key `status` and whether or not the key `is_primary`. - static Entry CreateFromKey(std::unique_ptr<Key> key, KeyStatus status, + static Entry CreateFromKey(std::shared_ptr<const Key> key, KeyStatus status, bool is_primary); template <typename CopyableKey> @@ -70,7 +70,7 @@ class KeysetHandleBuilder { // Creates new KeysetHandleBuilder::Entry from given `parameters`. Also, // sets key `status` and whether or not the key `is_primary`. If `id` // does not have a value, then the key will be assigned a random id. - static Entry CreateFromParams(std::unique_ptr<Parameters> parameters, + static Entry CreateFromParams(std::shared_ptr<const Parameters> parameters, KeyStatus status, bool is_primary, absl::optional<int> id = absl::nullopt); |