diff options
Diffstat (limited to 'src/block/serpent/serpent.h')
-rw-r--r-- | src/block/serpent/serpent.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/block/serpent/serpent.h b/src/block/serpent/serpent.h index dc81d4178..515a90407 100644 --- a/src/block/serpent/serpent.h +++ b/src/block/serpent/serpent.h @@ -18,19 +18,19 @@ namespace Botan { class BOTAN_DLL Serpent : public BlockCipher { public: - void encrypt_n(const byte in[], byte out[], u32bit blocks) const; - void decrypt_n(const byte in[], byte out[], u32bit blocks) const; + void encrypt_n(const byte in[], byte out[], size_t blocks) const; + void decrypt_n(const byte in[], byte out[], size_t blocks) const; - void clear() { round_key.clear(); } + void clear() { zeroise(round_key); } std::string name() const { return "Serpent"; } BlockCipher* clone() const { return new Serpent; } - Serpent() : BlockCipher(16, 16, 32, 8) {} + Serpent() : BlockCipher(16, 16, 32, 8), round_key(132) {} protected: /** * For use by subclasses using SIMD, asm, etc * @return const reference to the key schedule */ - const SecureVector<u32bit, 132>& get_round_keys() const + const SecureVector<u32bit>& get_round_keys() const { return round_key; } /** @@ -41,8 +41,8 @@ class BOTAN_DLL Serpent : public BlockCipher { round_key.set(ks, 132); } private: - void key_schedule(const byte key[], u32bit length); - SecureVector<u32bit, 132> round_key; + void key_schedule(const byte key[], size_t length); + SecureVector<u32bit> round_key; }; } |