aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/new_engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/new_engine.cpp')
-rw-r--r--doc/examples/new_engine.cpp7
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)
{