-
tholenst authored
We create a class PrimitiveWrapper with a method Wrap which essentially replaces the static function [Primitive]SetWrapper::New[Primitive] for each Primitive. We then allow registering this object in the registry and add a method Wrap to the registry. This allows us to replace the function AeadFactory::GetPrimitive with a completely templatized one, which means we will be able to remove the factories. As Thai suggested, I think later we should add a function GetPrimitive<P> to the KeysetHandle. I added a call to register to the AeadFactory; this ensures that it works the same way as before. PiperOrigin-RevId: 218659629 GitOrigin-RevId: 4b99c6356f158c94d7e6d1497f483ea32062940f
8e19ab5b