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/twofish | |
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/twofish')
-rw-r--r-- | src/block/twofish/two_tab.cpp | 10 | ||||
-rw-r--r-- | src/block/twofish/twofish.cpp | 40 | ||||
-rw-r--r-- | src/block/twofish/twofish.h | 16 |
3 files changed, 36 insertions, 30 deletions
diff --git a/src/block/twofish/two_tab.cpp b/src/block/twofish/two_tab.cpp index 7d349312b..19ba58de6 100644 --- a/src/block/twofish/two_tab.cpp +++ b/src/block/twofish/two_tab.cpp @@ -1,7 +1,9 @@ -/************************************************* -* S-Box and MDS Tables for Twofish * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* S-Box and MDS Tables for Twofish +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include <botan/twofish.h> diff --git a/src/block/twofish/twofish.cpp b/src/block/twofish/twofish.cpp index d6bab2fc5..edc476d15 100644 --- a/src/block/twofish/twofish.cpp +++ b/src/block/twofish/twofish.cpp @@ -1,7 +1,9 @@ -/************************************************* -* Twofish Source File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* Twofish +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include <botan/twofish.h> #include <botan/loadstor.h> @@ -9,9 +11,9 @@ namespace Botan { -/************************************************* -* Twofish Encryption * -*************************************************/ +/* +* Twofish Encryption +*/ void Twofish::enc(const byte in[], byte out[]) const { u32bit A = load_le<u32bit>(in, 0) ^ round_key[0]; @@ -54,9 +56,9 @@ void Twofish::enc(const byte in[], byte out[]) const store_le(out, C, D, A, B); } -/************************************************* -* Twofish Decryption * -*************************************************/ +/* +* Twofish Decryption +*/ void Twofish::dec(const byte in[], byte out[]) const { u32bit A = load_le<u32bit>(in, 0) ^ round_key[4]; @@ -99,9 +101,9 @@ void Twofish::dec(const byte in[], byte out[]) const store_le(out, C, D, A, B); } -/************************************************* -* Twofish Key Schedule * -*************************************************/ +/* +* Twofish Key Schedule +*/ void Twofish::key_schedule(const byte key[], u32bit length) { SecureBuffer<byte, 16> S; @@ -180,9 +182,9 @@ void Twofish::key_schedule(const byte key[], u32bit length) } } -/************************************************* -* Do one column of the RS matrix multiplcation * -*************************************************/ +/* +* Do one column of the RS matrix multiplcation +*/ void Twofish::rs_mul(byte S[4], byte key, u32bit offset) { if(key) @@ -201,9 +203,9 @@ void Twofish::rs_mul(byte S[4], byte key, u32bit offset) } } -/************************************************* -* Clear memory of sensitive data * -*************************************************/ +/* +* Clear memory of sensitive data +*/ void Twofish::clear() throw() { SBox0.clear(); diff --git a/src/block/twofish/twofish.h b/src/block/twofish/twofish.h index 39f0a6121..0640e32f8 100644 --- a/src/block/twofish/twofish.h +++ b/src/block/twofish/twofish.h @@ -1,7 +1,9 @@ -/************************************************* -* Twofish Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* Twofish +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #ifndef BOTAN_TWOFISH_H__ #define BOTAN_TWOFISH_H__ @@ -10,9 +12,9 @@ namespace Botan { -/************************************************* -* Twofish * -*************************************************/ +/* +* Twofish +*/ class BOTAN_DLL Twofish : public BlockCipher { public: |