diff options
author | lloyd <[email protected]> | 2009-10-14 22:35:03 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-10-14 22:35:03 +0000 |
commit | 09a17201a8132f8422a4c371cf1e56553317bc66 (patch) | |
tree | 912dff1d664d10a473554d6517ba44c8e980545e /src/stream/wid_wake/wid_wake.h | |
parent | 28f875732c6379531e28c12091c44031941e0dff (diff) |
Cleanups/random changes in the stream cipher code:
Remove encrypt, decrypt - replace by cipher() and cipher1()
Remove seek() - not well supported/tested, I want to redo with a new interface
once CTR and OFB modes become stream ciphers.
Rename resync to set_iv()
Remove StreamCipher::IV_LENGTH and add StreamCipher::valid_iv_length() to
allow multiple IV lengths (as for instance Turing allows, as would Salsa20
if XSalsa20 were supported).
Diffstat (limited to 'src/stream/wid_wake/wid_wake.h')
-rw-r--r-- | src/stream/wid_wake/wid_wake.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/stream/wid_wake/wid_wake.h b/src/stream/wid_wake/wid_wake.h index 4720afdb2..a037a056e 100644 --- a/src/stream/wid_wake/wid_wake.h +++ b/src/stream/wid_wake/wid_wake.h @@ -18,14 +18,18 @@ namespace Botan { class BOTAN_DLL WiderWake_41_BE : public StreamCipher { public: + void cipher(const byte[], byte[], u32bit); + void set_iv(const byte[], u32bit); + + bool valid_iv_length(u32bit iv_len) const + { return (iv_len == 8); } + void clear() throw(); std::string name() const { return "WiderWake4+1-BE"; } StreamCipher* clone() const { return new WiderWake_41_BE; } - WiderWake_41_BE() : StreamCipher(16, 16, 1, 8) {} + WiderWake_41_BE() : StreamCipher(16, 16, 1) {} private: - void cipher(const byte[], byte[], u32bit); void key_schedule(const byte[], u32bit); - void resync(const byte[], u32bit); void generate(u32bit); |