diff options
author | lloyd <[email protected]> | 2009-03-30 18:27:18 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-03-30 18:27:18 +0000 |
commit | 96d6eb6f29c55e16a37cf11899547886f735b065 (patch) | |
tree | 9f13901e9b44c98d58b2589c9b09c6a7443eb7cd /src/block/lion | |
parent | 3cc3dd72c5f87b76852a55c1f2d1821dba967d8c (diff) |
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).
Diffstat (limited to 'src/block/lion')
-rw-r--r-- | src/block/lion/lion.cpp | 52 | ||||
-rw-r--r-- | src/block/lion/lion.h | 16 |
2 files changed, 36 insertions, 32 deletions
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 <botan/lion.h> #include <botan/xor_buf.h> @@ -9,9 +11,9 @@ namespace Botan { -/************************************************* -* Lion Encryption * -*************************************************/ +/* +* Lion Encryption +*/ void Lion::enc(const byte in[], byte out[]) const { SecureVector<byte> 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<byte> 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<u32bit>(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: |