From 96d6eb6f29c55e16a37cf11899547886f735b065 Mon Sep 17 00:00:00 2001 From: lloyd Date: Mon, 30 Mar 2009 18:27:18 +0000 Subject: Thomas Moschny passed along a request from the Fedora packagers which came up during the Fedora submission review, that each source file include some text about the license. One handy Perl script later and each file now has the line Distributed under the terms of the Botan license after the copyright notices. While I was in there modifying every file anyway, I also stripped out the remainder of the block comments (lots of astericks before and after the text); this is stylistic thing I picked up when I was first learning C++ but in retrospect it is not a good style as the structure makes it harder to modify comments (with the result that comments become fewer, shorter and are less likely to be updated, which are not good things). --- src/block/lion/lion.cpp | 52 +++++++++++++++++++++++++------------------------ src/block/lion/lion.h | 16 ++++++++------- 2 files changed, 36 insertions(+), 32 deletions(-) (limited to 'src/block/lion') diff --git a/src/block/lion/lion.cpp b/src/block/lion/lion.cpp index f35cbf424..c7cdf6d13 100644 --- a/src/block/lion/lion.cpp +++ b/src/block/lion/lion.cpp @@ -1,7 +1,9 @@ -/************************************************* -* Lion Source File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* Lion +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include #include @@ -9,9 +11,9 @@ namespace Botan { -/************************************************* -* Lion Encryption * -*************************************************/ +/* +* Lion Encryption +*/ void Lion::enc(const byte in[], byte out[]) const { SecureVector buffer(LEFT_SIZE); @@ -29,9 +31,9 @@ void Lion::enc(const byte in[], byte out[]) const cipher->encrypt(out + LEFT_SIZE, RIGHT_SIZE); } -/************************************************* -* Lion Decryption * -*************************************************/ +/* +* Lion Decryption +*/ void Lion::dec(const byte in[], byte out[]) const { SecureVector buffer(LEFT_SIZE); @@ -49,9 +51,9 @@ void Lion::dec(const byte in[], byte out[]) const cipher->encrypt(out + LEFT_SIZE, RIGHT_SIZE); } -/************************************************* -* Lion Key Schedule * -*************************************************/ +/* +* Lion Key Schedule +*/ void Lion::key_schedule(const byte key[], u32bit length) { clear(); @@ -60,9 +62,9 @@ void Lion::key_schedule(const byte key[], u32bit length) key2.copy(key + length / 2, length / 2); } -/************************************************* -* Return the name of this type * -*************************************************/ +/* +* Return the name of this type +*/ std::string Lion::name() const { return "Lion(" + hash->name() + "," + @@ -70,17 +72,17 @@ std::string Lion::name() const to_string(BLOCK_SIZE) + ")"; } -/************************************************* -* Return a clone of this object * -*************************************************/ +/* +* Return a clone of this object +*/ BlockCipher* Lion::clone() const { return new Lion(hash->clone(), cipher->clone(), BLOCK_SIZE); } -/************************************************* -* Clear memory of sensitive data * -*************************************************/ +/* +* Clear memory of sensitive data +*/ void Lion::clear() throw() { hash->clear(); @@ -89,9 +91,9 @@ void Lion::clear() throw() key2.clear(); } -/************************************************* -* Lion Constructor * -*************************************************/ +/* +* Lion Constructor +*/ Lion::Lion(HashFunction* hash_in, StreamCipher* sc_in, u32bit block_len) : BlockCipher(std::max(2*hash_in->OUTPUT_LENGTH + 1, block_len), 2, 2*hash_in->OUTPUT_LENGTH, 2), diff --git a/src/block/lion/lion.h b/src/block/lion/lion.h index b16db966e..5bc4e72c0 100644 --- a/src/block/lion/lion.h +++ b/src/block/lion/lion.h @@ -1,7 +1,9 @@ -/************************************************* -* Lion Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* Lion +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #ifndef BOTAN_LION_H__ #define BOTAN_LION_H__ @@ -12,9 +14,9 @@ namespace Botan { -/************************************************* -* Lion * -*************************************************/ +/* +* Lion +*/ class BOTAN_DLL Lion : public BlockCipher { public: -- cgit v1.2.3