aboutsummaryrefslogtreecommitdiff
path: root/cc/primitive_wrapper.h
diff options
context:
space:
mode:
authortholenst <tholenst@google.com>2020-11-24 07:22:41 -0800
committerCopybara-Service <copybara-worker@google.com>2020-11-24 07:23:17 -0800
commit204d4570a828cde04a8a3992f05df22e4e497817 (patch)
tree3d062dc173a20f1ba3d86e88fdd72ab4b90fdcac /cc/primitive_wrapper.h
parente6db8194ea6295d01cffb83f607397d4581915ec (diff)
downloadtink-204d4570a828cde04a8a3992f05df22e4e497817.tar.gz
Rename the "TransformingPrimitiveWrapper<P,Q>" to "PrimitiveWrapper<P,Q>" 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
Diffstat (limited to 'cc/primitive_wrapper.h')
-rw-r--r--cc/primitive_wrapper.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/primitive_wrapper.h b/cc/primitive_wrapper.h
index 5c222c928..beadd8b87 100644
--- a/cc/primitive_wrapper.h
+++ b/cc/primitive_wrapper.h
@@ -31,12 +31,12 @@ namespace tink {
//
// PrimitiveWrappers need to be written for every new primitive. They can be
// registered in the registry to be fully integrated in Tink.
-template <class Primitive>
+template <typename InputPrimitive, typename Primitive>
class PrimitiveWrapper {
public:
virtual ~PrimitiveWrapper() {}
virtual crypto::tink::util::StatusOr<std::unique_ptr<Primitive>> Wrap(
- std::unique_ptr<PrimitiveSet<Primitive>> primitive_set) const = 0;
+ std::unique_ptr<PrimitiveSet<InputPrimitive>> primitive_set) const = 0;
};
} // namespace tink