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/hash/rmd160 | |
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/hash/rmd160')
-rw-r--r-- | src/hash/rmd160/rmd160.cpp | 58 | ||||
-rw-r--r-- | src/hash/rmd160/rmd160.h | 16 |
2 files changed, 39 insertions, 35 deletions
diff --git a/src/hash/rmd160/rmd160.cpp b/src/hash/rmd160/rmd160.cpp index 249ce7fb1..3efbe674a 100644 --- a/src/hash/rmd160/rmd160.cpp +++ b/src/hash/rmd160/rmd160.cpp @@ -1,7 +1,9 @@ -/************************************************* -* RIPEMD-160 Source File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* RIPEMD-160 +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include <botan/rmd160.h> #include <botan/loadstor.h> @@ -11,9 +13,9 @@ namespace Botan { namespace { -/************************************************* -* RIPEMD-160 F1 Function * -*************************************************/ +/* +* RIPEMD-160 F1 Function +*/ inline void F1(u32bit& A, u32bit B, u32bit& C, u32bit D, u32bit E, u32bit msg, u32bit shift) { @@ -22,9 +24,9 @@ inline void F1(u32bit& A, u32bit B, u32bit& C, u32bit D, u32bit E, C = rotate_left(C, 10); } -/************************************************* -* RIPEMD-160 F2 Function * -*************************************************/ +/* +* RIPEMD-160 F2 Function +*/ inline void F2(u32bit& A, u32bit B, u32bit& C, u32bit D, u32bit E, u32bit msg, u32bit shift, u32bit magic) { @@ -33,9 +35,9 @@ inline void F2(u32bit& A, u32bit B, u32bit& C, u32bit D, u32bit E, C = rotate_left(C, 10); } -/************************************************* -* RIPEMD-160 F3 Function * -*************************************************/ +/* +* RIPEMD-160 F3 Function +*/ inline void F3(u32bit& A, u32bit B, u32bit& C, u32bit D, u32bit E, u32bit msg, u32bit shift, u32bit magic) { @@ -44,9 +46,9 @@ inline void F3(u32bit& A, u32bit B, u32bit& C, u32bit D, u32bit E, C = rotate_left(C, 10); } -/************************************************* -* RIPEMD-160 F4 Function * -*************************************************/ +/* +* RIPEMD-160 F4 Function +*/ inline void F4(u32bit& A, u32bit B, u32bit& C, u32bit D, u32bit E, u32bit msg, u32bit shift, u32bit magic) { @@ -55,9 +57,9 @@ inline void F4(u32bit& A, u32bit B, u32bit& C, u32bit D, u32bit E, C = rotate_left(C, 10); } -/************************************************* -* RIPEMD-160 F5 Function * -*************************************************/ +/* +* RIPEMD-160 F5 Function +*/ inline void F5(u32bit& A, u32bit B, u32bit& C, u32bit D, u32bit E, u32bit msg, u32bit shift, u32bit magic) { @@ -68,9 +70,9 @@ inline void F5(u32bit& A, u32bit B, u32bit& C, u32bit D, u32bit E, } -/************************************************* -* RIPEMD-160 Compression Function * -*************************************************/ +/* +* RIPEMD-160 Compression Function +*/ void RIPEMD_160::compress_n(const byte input[], u32bit blocks) { const u32bit MAGIC2 = 0x5A827999, MAGIC3 = 0x6ED9EBA1, @@ -182,18 +184,18 @@ void RIPEMD_160::compress_n(const byte input[], u32bit blocks) } } -/************************************************* -* Copy out the digest * -*************************************************/ +/* +* Copy out the digest +*/ void RIPEMD_160::copy_out(byte output[]) { for(u32bit j = 0; j != OUTPUT_LENGTH; j += 4) store_le(digest[j/4], output + j); } -/************************************************* -* Clear memory of sensitive data * -*************************************************/ +/* +* Clear memory of sensitive data +*/ void RIPEMD_160::clear() throw() { MDx_HashFunction::clear(); diff --git a/src/hash/rmd160/rmd160.h b/src/hash/rmd160/rmd160.h index 939fe5668..f2babc582 100644 --- a/src/hash/rmd160/rmd160.h +++ b/src/hash/rmd160/rmd160.h @@ -1,7 +1,9 @@ -/************************************************* -* RIPEMD-160 Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* RIPEMD-160 +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #ifndef BOTAN_RIPEMD_160_H__ #define BOTAN_RIPEMD_160_H__ @@ -10,9 +12,9 @@ namespace Botan { -/************************************************* -* RIPEMD-160 * -*************************************************/ +/* +* RIPEMD-160 +*/ class BOTAN_DLL RIPEMD_160 : public MDx_HashFunction { public: |