Age | Commit message (Collapse) | Author |
|
Prevents calls to internal::ConfigurationImpl::RegisterPrimitiveWrapper from requiring the specification of these parameters.
See similar practice [1] with example usage [2].
[1] https://github.com/tink-crypto/tink-cc/blob/d0fc7fe57b030330a4c2f20a23f414f8a031e57b/tink/core/key_type_manager.h#L106
[2] https://github.com/tink-crypto/tink-cc/blob/d0fc7fe57b030330a4c2f20a23f414f8a031e57b/tink/internal/configuration_impl.h#L43
PiperOrigin-RevId: 534923026
|
|
PiperOrigin-RevId: 495844595
|
|
and remove PrimitiveWrapper<P>.
This is, strictly speaking, incompatible with previously releases. However, the incompatibility will only manifest itself if a user uses their own primitive, which I don't expect to be the case.
Furthermore, the fix is very easy (see e.g. the change in AeadWrapper). Hence, in the spirit of not having much technical debt, I suggest to be backwards incompatible.
Note that the registry still will only accept PrimitiveWrapper<P,P> objects. We will allow registering PrimitiveWrapper<P,Q> objects later.
PiperOrigin-RevId: 344053514
|
|
PiperOrigin-RevId: 268215250
|
|
PiperOrigin-RevId: 244809547
GitOrigin-RevId: 13a687e6b6f1ec3189494c4a05c3c9d440927db8
|
|
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
|