aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/rmd128/rmd128.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-03-30 18:27:18 +0000
committerlloyd <[email protected]>2009-03-30 18:27:18 +0000
commit96d6eb6f29c55e16a37cf11899547886f735b065 (patch)
tree9f13901e9b44c98d58b2589c9b09c6a7443eb7cd /src/hash/rmd128/rmd128.cpp
parent3cc3dd72c5f87b76852a55c1f2d1821dba967d8c (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/rmd128/rmd128.cpp')
-rw-r--r--src/hash/rmd128/rmd128.cpp52
1 files changed, 27 insertions, 25 deletions
diff --git a/src/hash/rmd128/rmd128.cpp b/src/hash/rmd128/rmd128.cpp
index 52d0c5f56..b6d0a4590 100644
--- a/src/hash/rmd128/rmd128.cpp
+++ b/src/hash/rmd128/rmd128.cpp
@@ -1,7 +1,9 @@
-/*************************************************
-* RIPEMD-128 Source File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* RIPEMD-128
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#include <botan/rmd128.h>
#include <botan/loadstor.h>
@@ -11,9 +13,9 @@ namespace Botan {
namespace {
-/*************************************************
-* RIPEMD-128 F1 Function *
-*************************************************/
+/*
+* RIPEMD-128 F1 Function
+*/
inline void F1(u32bit& A, u32bit B, u32bit C, u32bit D,
u32bit msg, u32bit shift)
{
@@ -21,9 +23,9 @@ inline void F1(u32bit& A, u32bit B, u32bit C, u32bit D,
A = rotate_left(A, shift);
}
-/*************************************************
-* RIPEMD-128 F2 Function *
-*************************************************/
+/*
+* RIPEMD-128 F2 Function
+*/
inline void F2(u32bit& A, u32bit B, u32bit C, u32bit D,
u32bit msg, u32bit shift, u32bit magic)
{
@@ -31,9 +33,9 @@ inline void F2(u32bit& A, u32bit B, u32bit C, u32bit D,
A = rotate_left(A, shift);
}
-/*************************************************
-* RIPEMD-128 F3 Function *
-*************************************************/
+/*
+* RIPEMD-128 F3 Function
+*/
inline void F3(u32bit& A, u32bit B, u32bit C, u32bit D,
u32bit msg, u32bit shift, u32bit magic)
{
@@ -41,9 +43,9 @@ inline void F3(u32bit& A, u32bit B, u32bit C, u32bit D,
A = rotate_left(A, shift);
}
-/*************************************************
-* RIPEMD-128 F4 Function *
-*************************************************/
+/*
+* RIPEMD-128 F4 Function
+*/
inline void F4(u32bit& A, u32bit B, u32bit C, u32bit D,
u32bit msg, u32bit shift, u32bit magic)
{
@@ -53,9 +55,9 @@ inline void F4(u32bit& A, u32bit B, u32bit C, u32bit D,
}
-/*************************************************
-* RIPEMD-128 Compression Function *
-*************************************************/
+/*
+* RIPEMD-128 Compression Function
+*/
void RIPEMD_128::compress_n(const byte input[], u32bit blocks)
{
for(u32bit i = 0; i != blocks; ++i)
@@ -145,18 +147,18 @@ void RIPEMD_128::compress_n(const byte input[], u32bit blocks)
}
}
-/*************************************************
-* Copy out the digest *
-*************************************************/
+/*
+* Copy out the digest
+*/
void RIPEMD_128::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_128::clear() throw()
{
MDx_HashFunction::clear();