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/has160 | |
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/has160')
-rw-r--r-- | src/hash/has160/has160.cpp | 52 | ||||
-rw-r--r-- | src/hash/has160/has160.h | 16 |
2 files changed, 36 insertions, 32 deletions
diff --git a/src/hash/has160/has160.cpp b/src/hash/has160/has160.cpp index f31016629..4441b0b43 100644 --- a/src/hash/has160/has160.cpp +++ b/src/hash/has160/has160.cpp @@ -1,7 +1,9 @@ -/************************************************* -* HAS-160 Source File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* HAS-160 +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #include <botan/has160.h> #include <botan/loadstor.h> @@ -11,9 +13,9 @@ namespace Botan { namespace { -/************************************************* -* HAS-160 F1 Function * -*************************************************/ +/* +* HAS-160 F1 Function +*/ inline void F1(u32bit A, u32bit& B, u32bit C, u32bit D, u32bit& E, u32bit msg, u32bit rot) { @@ -21,9 +23,9 @@ inline void F1(u32bit A, u32bit& B, u32bit C, u32bit D, u32bit& E, B = rotate_left(B, 10); } -/************************************************* -* HAS-160 F2 Function * -*************************************************/ +/* +* HAS-160 F2 Function +*/ inline void F2(u32bit A, u32bit& B, u32bit C, u32bit D, u32bit& E, u32bit msg, u32bit rot) { @@ -31,9 +33,9 @@ inline void F2(u32bit A, u32bit& B, u32bit C, u32bit D, u32bit& E, B = rotate_left(B, 17); } -/************************************************* -* HAS-160 F3 Function * -*************************************************/ +/* +* HAS-160 F3 Function +*/ inline void F3(u32bit A, u32bit& B, u32bit C, u32bit D, u32bit& E, u32bit msg, u32bit rot) { @@ -41,9 +43,9 @@ inline void F3(u32bit A, u32bit& B, u32bit C, u32bit D, u32bit& E, B = rotate_left(B, 25); } -/************************************************* -* HAS-160 F4 Function * -*************************************************/ +/* +* HAS-160 F4 Function +*/ inline void F4(u32bit A, u32bit& B, u32bit C, u32bit D, u32bit& E, u32bit msg, u32bit rot) { @@ -53,9 +55,9 @@ inline void F4(u32bit A, u32bit& B, u32bit C, u32bit D, u32bit& E, } -/************************************************* -* HAS-160 Compression Function * -*************************************************/ +/* +* HAS-160 Compression Function +*/ void HAS_160::compress_n(const byte input[], u32bit blocks) { for(u32bit i = 0; i != blocks; ++i) @@ -131,18 +133,18 @@ void HAS_160::compress_n(const byte input[], u32bit blocks) } } -/************************************************* -* Copy out the digest * -*************************************************/ +/* +* Copy out the digest +*/ void HAS_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 HAS_160::clear() throw() { MDx_HashFunction::clear(); diff --git a/src/hash/has160/has160.h b/src/hash/has160/has160.h index d3a422833..44bb63b9d 100644 --- a/src/hash/has160/has160.h +++ b/src/hash/has160/has160.h @@ -1,7 +1,9 @@ -/************************************************* -* HAS-160 Header File * -* (C) 1999-2007 Jack Lloyd * -*************************************************/ +/* +* HAS-160 +* (C) 1999-2007 Jack Lloyd +* +* Distributed under the terms of the Botan license +*/ #ifndef BOTAN_HAS_160_H__ #define BOTAN_HAS_160_H__ @@ -10,9 +12,9 @@ namespace Botan { -/************************************************* -* HAS-160 * -*************************************************/ +/* +* HAS-160 +*/ class BOTAN_DLL HAS_160 : public MDx_HashFunction { public: |