Skip to content
Snippets Groups Projects
Commit ee5b3530 authored by tholenst's avatar tholenst Committed by Copybara-Service
Browse files

Add the primitives as template parameter to the InternalKeyMananger.

Unfortunately, without a change, it is impossible to use the InternalKeyManager in the registry. The reason is that there is no place where the previous code [1] can be instantiated in the registry (i.e., I cannot write any code which calls [1] in the registry).

In the (to be written) function RegisterInternalKeyManager(...) I cannot call the code at [1] because it's impossible to know the primitive type for which to call it. In GetPrimitive<P> it is impossible because it's impossible to have the KeyProto type.

The only option is to call it in the constructor of http://google3/third_party/tink/cc/core/internal_key_manager.h?l=82-89&rcl=244821003. But that would mean that we have to change the interface of InternalKeyMananger (i.e., add something like a function StatusOr<shared_ptr<void*>> Create(string_view serialized_key, std::type_index type), which I think is very complicated to understand).

PiperOrigin-RevId: 246273708
parent 7c32bbfb
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment