aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/algo_base/transform.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2014-11-05 12:00:24 +0000
committerlloyd <[email protected]>2014-11-05 12:00:24 +0000
commit4f474481f46bffc095ae104485b8da95bcb03973 (patch)
tree2da1bf58bdce2a2e9a1a8a6f8d27dbdb3a87e174 /src/lib/algo_base/transform.h
parentf78e5e3fbd87d2e903f5ff4a230b65ac6d44f281 (diff)
Replace Transformatio::nstart with start_raw so we can do a full set
of overloads in the base class with the same name.
Diffstat (limited to 'src/lib/algo_base/transform.h')
-rw-r--r--src/lib/algo_base/transform.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/lib/algo_base/transform.h b/src/lib/algo_base/transform.h
index 229425efd..4fe958632 100644
--- a/src/lib/algo_base/transform.h
+++ b/src/lib/algo_base/transform.h
@@ -28,6 +28,17 @@ class BOTAN_DLL Transformation
* @param nonce the per message nonce
*/
template<typename Alloc>
+ secure_vector<byte> start(const std::vector<byte, Alloc>& nonce)
+ {
+ return start(&nonce[0], nonce.size());
+ }
+
+ /**
+ * Begin processing a message.
+ * @param nonce the per message nonce
+ */
+ template<typename Alloc>
+ BOTAN_DEPRECATED("Use Transformation::start")
secure_vector<byte> start_vec(const std::vector<byte, Alloc>& nonce)
{
return start(&nonce[0], nonce.size());
@@ -38,7 +49,20 @@ class BOTAN_DLL Transformation
* @param nonce the per message nonce
* @param nonce_len length of nonce
*/
- virtual secure_vector<byte> start(const byte nonce[], size_t nonce_len) = 0;
+ secure_vector<byte> start(const byte nonce[], size_t nonce_len)
+ {
+ return start_raw(nonce, nonce_len);
+ }
+
+ /**
+ * Begin processing a message.
+ */
+ secure_vector<byte> start()
+ {
+ return start_raw(nullptr, 0);
+ }
+
+ virtual secure_vector<byte> start_raw(const byte nonce[], size_t nonce_len) = 0;
/**
* Process some data. Input must be in size update_granularity() byte blocks.