aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-08-23 05:50:30 +0000
committerlloyd <[email protected]>2006-08-23 05:50:30 +0000
commit6b688d86c95da868dfe600c9d39485a4fafda0f8 (patch)
tree1e647b6d40c787eaea17ddcc032cf3423c530460 /src
parent6584d0c80a7f6e34d1507f23e2e6a49c15aa8bb7 (diff)
Add a new version of the StreamCipher_Filter constructor that takes a key
as well as the cipher name
Diffstat (limited to 'src')
-rw-r--r--src/filters.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/filters.cpp b/src/filters.cpp
index aadc32c4e..9ea082980 100644
--- a/src/filters.cpp
+++ b/src/filters.cpp
@@ -19,6 +19,17 @@ StreamCipher_Filter::StreamCipher_Filter(const std::string& sc_name) :
}
/*************************************************
+* StreamCipher_Filter Constructor *
+*************************************************/
+StreamCipher_Filter::StreamCipher_Filter(const std::string& sc_name,
+ const SymmetricKey& key) :
+ buffer(DEFAULT_BUFFERSIZE)
+ {
+ base_ptr = cipher = get_stream_cipher(sc_name);
+ cipher->set_key(key);
+ }
+
+/*************************************************
* Set the IV of a stream cipher *
*************************************************/
void StreamCipher_Filter::set_iv(const InitializationVector& iv)