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/rc5 | |
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/rc5')
-rw-r--r-- | src/block/rc5/rc5.cpp | 40 | ||||
-rw-r--r-- | src/block/rc5/rc5.h | 16 |
2 files changed, 30 insertions, 26 deletions
diff --git a/src/block/rc5/rc5.cpp b/src/block/rc5/rc5.cpp index c4e4bf9b0..57219f413 100644 --- a/src/block/rc5/rc5.cpp +++ b/src/block/rc5/rc5.cpp @@ -1,7 +1,9 @@ -/************************************************* -* RC5 Source File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* RC5 +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include <botan/rc5.h> #include <botan/loadstor.h> @@ -11,9 +13,9 @@ namespace Botan { -/************************************************* -* RC5 Encryption * -*************************************************/ +/* +* RC5 Encryption +*/ void RC5::enc(const byte in[], byte out[]) const { u32bit A = load_le<u32bit>(in, 0), B = load_le<u32bit>(in, 1); @@ -34,9 +36,9 @@ void RC5::enc(const byte in[], byte out[]) const store_le(out, A, B); } -/************************************************* -* RC5 Decryption * -*************************************************/ +/* +* RC5 Decryption +*/ void RC5::dec(const byte in[], byte out[]) const { u32bit A = load_le<u32bit>(in, 0), B = load_le<u32bit>(in, 1); @@ -57,9 +59,9 @@ void RC5::dec(const byte in[], byte out[]) const store_le(out, A, B); } -/************************************************* -* RC5 Key Schedule * -*************************************************/ +/* +* RC5 Key Schedule +*/ void RC5::key_schedule(const byte key[], u32bit length) { const u32bit WORD_KEYLENGTH = (((length - 1) / 4) + 1), @@ -80,17 +82,17 @@ void RC5::key_schedule(const byte key[], u32bit length) } } -/************************************************* -* Return the name of this type * -*************************************************/ +/* +* Return the name of this type +*/ std::string RC5::name() const { return "RC5(" + to_string(ROUNDS) + ")"; } -/************************************************* -* RC5 Constructor * -*************************************************/ +/* +* RC5 Constructor +*/ RC5::RC5(u32bit r) : BlockCipher(8, 1, 32), ROUNDS(r) { if(ROUNDS < 8 || ROUNDS > 32 || (ROUNDS % 4 != 0)) diff --git a/src/block/rc5/rc5.h b/src/block/rc5/rc5.h index 6fbeb7c51..083224720 100644 --- a/src/block/rc5/rc5.h +++ b/src/block/rc5/rc5.h @@ -1,7 +1,9 @@ -/************************************************* -* RC5 Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* RC5 +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #ifndef BOTAN_RC5_H__ #define BOTAN_RC5_H__ @@ -10,9 +12,9 @@ namespace Botan { -/************************************************* -* RC5 * -*************************************************/ +/* +* RC5 +*/ class BOTAN_DLL RC5 : public BlockCipher { public: |