From f305cfa4855e8ccf373e545c619a4c9e9b4502ad Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Tue, 24 Jul 2018 13:58:05 -0400 Subject: Use Alloc templates instead of overriding for specific vector types --- src/lib/pubkey/pubkey.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/lib') diff --git a/src/lib/pubkey/pubkey.h b/src/lib/pubkey/pubkey.h index a33142079..64bb1cc9e 100644 --- a/src/lib/pubkey/pubkey.h +++ b/src/lib/pubkey/pubkey.h @@ -217,19 +217,12 @@ class BOTAN_PUBLIC_API(2,0) PK_Signer final * @param rng the rng to use * @return signature */ - std::vector sign_message(const std::vector& in, - RandomNumberGenerator& rng) - { return sign_message(in.data(), in.size(), rng); } - - /** - * Sign a message. - * @param in the message to sign - * @param rng the rng to use - * @return signature - */ - std::vector sign_message(const secure_vector& in, - RandomNumberGenerator& rng) - { return sign_message(in.data(), in.size(), rng); } + template + std::vector sign_message(const std::vector& in, + RandomNumberGenerator& rng) + { + return sign_message(in.data(), in.size(), rng); + } /** * Add a message part (single byte). @@ -248,7 +241,11 @@ class BOTAN_PUBLIC_API(2,0) PK_Signer final * Add a message part. * @param in the message part to add */ - void update(const std::vector& in) { update(in.data(), in.size()); } + template + void update(const std::vector& in) + { + update(in.data(), in.size()); + } /** * Add a message part. @@ -347,8 +344,11 @@ class BOTAN_PUBLIC_API(2,0) PK_Verifier final * signature to be verified. * @param in the new message part */ - void update(const std::vector& in) - { update(in.data(), in.size()); } + template + void update(const std::vector& in) + { + update(in.data(), in.size()); + } /** * Add a message part of the message corresponding to the -- cgit v1.2.3