diff options
author | lloyd <[email protected]> | 2008-08-30 20:33:29 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2008-08-30 20:33:29 +0000 |
commit | 58e5a004c5d0526802745689e421ac5a52f1c9f8 (patch) | |
tree | f0e4018b715ce7f1f2836317e1e4140f009dd3f1 /doc/examples/xor_ciph.cpp | |
parent | 23c9da21cb5dfe8d33158f3e735e439c94bca0c5 (diff) |
Fix xor_ciph example
Diffstat (limited to 'doc/examples/xor_ciph.cpp')
-rw-r--r-- | doc/examples/xor_ciph.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/examples/xor_ciph.cpp b/doc/examples/xor_ciph.cpp index b9e46d91c..496d23323 100644 --- a/doc/examples/xor_ciph.cpp +++ b/doc/examples/xor_ciph.cpp @@ -13,6 +13,8 @@ using namespace Botan; class XOR_Cipher : public StreamCipher { public: + void clear() throw() { mask.destroy(); mask_pos = 0; } + // what we want to call this cipher std::string name() const { return "XOR"; } @@ -51,12 +53,12 @@ void XOR_Cipher::key(const byte key[], u32bit length) #include <botan/look_add.h> #include <botan/lookup.h> #include <botan/filters.h> -#include <botan/config.h> +#include <botan/libstate.h> int main() { add_algorithm(new XOR_Cipher); // make it available to use - global_config().add_alias("Vernam", "XOR"); // make Vernam an alias for XOR + global_state().add_alias("Vernam", "XOR"); // make Vernam an alias for XOR // a hex key value SymmetricKey key("010203040506070809101112AAFF"); |