aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/filters/algo_filt.cpp9
-rw-r--r--src/filters/filters.h6
2 files changed, 15 insertions, 0 deletions
diff --git a/src/filters/algo_filt.cpp b/src/filters/algo_filt.cpp
index 33a22b703..3a1f1d5da 100644
--- a/src/filters/algo_filt.cpp
+++ b/src/filters/algo_filt.cpp
@@ -22,6 +22,15 @@ StreamCipher_Filter::StreamCipher_Filter(const std::string& sc_name) :
/*************************************************
* StreamCipher_Filter Constructor *
*************************************************/
+StreamCipher_Filter::StreamCipher_Filter(StreamCipher* stream_cipher) :
+ buffer(DEFAULT_BUFFERSIZE)
+ {
+ base_ptr = cipher = stream_cipher;
+ }
+
+/*************************************************
+* StreamCipher_Filter Constructor *
+*************************************************/
StreamCipher_Filter::StreamCipher_Filter(const std::string& sc_name,
const SymmetricKey& key) :
buffer(DEFAULT_BUFFERSIZE)
diff --git a/src/filters/filters.h b/src/filters/filters.h
index af9e6a6cc..6cfbef3c0 100644
--- a/src/filters/filters.h
+++ b/src/filters/filters.h
@@ -55,6 +55,12 @@ class BOTAN_DLL StreamCipher_Filter : public Keyed_Filter
/**
* Construct a stream cipher filter.
+ * @param cipher_obj a cipher object to use
+ */
+ StreamCipher_Filter(StreamCipher* cipher_obj);
+
+ /**
+ * Construct a stream cipher filter.
* @param cipher the name of the desired cipher
*/
StreamCipher_Filter(const std::string& cipher);