diff options
author | lloyd <[email protected]> | 2010-10-29 12:59:19 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-10-29 12:59:19 +0000 |
commit | 2e89e24a4b35172eab4799a3243263bca950a9d2 (patch) | |
tree | 0b18c52d28c7796a8b064ad30def1a5014aa9b5f | |
parent | a8de7de2c8e3fc559d050bc3887d9fd12bac58ab (diff) |
New way of specifying key lengths
-rw-r--r-- | doc/examples/new_engine.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/doc/examples/new_engine.cpp b/doc/examples/new_engine.cpp index ed4abf4d2..4a2339bef 100644 --- a/doc/examples/new_engine.cpp +++ b/doc/examples/new_engine.cpp @@ -21,7 +21,12 @@ class XOR_Cipher : public StreamCipher // return a new object of this type StreamCipher* clone() const { return new XOR_Cipher; } - XOR_Cipher() : StreamCipher(1, 32) { mask_pos = 0; } + Key_Length_Specification key_spec() const + { + return Key_Length_Specification(1, 32); + } + + XOR_Cipher() : mask_pos(0) {} private: void cipher(const byte in[], byte out[], size_t length) { |