aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/md5
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/md5
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/md5')
-rw-r--r--src/hash/md5/md5.cpp52
-rw-r--r--src/hash/md5/md5.h4
2 files changed, 30 insertions, 26 deletions
diff --git a/src/hash/md5/md5.cpp b/src/hash/md5/md5.cpp
index 9a675850a..a5c614330 100644
--- a/src/hash/md5/md5.cpp
+++ b/src/hash/md5/md5.cpp
@@ -1,7 +1,9 @@
-/*************************************************
-* MD5 Source File *
-* (C) 1999-2008 Jack Lloyd *
-*************************************************/
+/*
+* MD5
+* (C) 1999-2008 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#include <botan/md5.h>
#include <botan/loadstor.h>
@@ -11,9 +13,9 @@ namespace Botan {
namespace {
-/*************************************************
-* MD5 FF Function *
-*************************************************/
+/*
+* MD5 FF Function
+*/
inline void FF(u32bit& A, u32bit B, u32bit C, u32bit D, u32bit msg,
byte S, u32bit magic)
{
@@ -21,9 +23,9 @@ inline void FF(u32bit& A, u32bit B, u32bit C, u32bit D, u32bit msg,
A = rotate_left(A, S) + B;
}
-/*************************************************
-* MD5 GG Function *
-*************************************************/
+/*
+* MD5 GG Function
+*/
inline void GG(u32bit& A, u32bit B, u32bit C, u32bit D, u32bit msg,
byte S, u32bit magic)
{
@@ -31,9 +33,9 @@ inline void GG(u32bit& A, u32bit B, u32bit C, u32bit D, u32bit msg,
A = rotate_left(A, S) + B;
}
-/*************************************************
-* MD5 HH Function *
-*************************************************/
+/*
+* MD5 HH Function
+*/
inline void HH(u32bit& A, u32bit B, u32bit C, u32bit D, u32bit msg,
byte S, u32bit magic)
{
@@ -41,9 +43,9 @@ inline void HH(u32bit& A, u32bit B, u32bit C, u32bit D, u32bit msg,
A = rotate_left(A, S) + B;
}
-/*************************************************
-* MD5 II Function *
-*************************************************/
+/*
+* MD5 II Function
+*/
inline void II(u32bit& A, u32bit B, u32bit C, u32bit D, u32bit msg,
byte S, u32bit magic)
{
@@ -53,9 +55,9 @@ inline void II(u32bit& A, u32bit B, u32bit C, u32bit D, u32bit msg,
}
-/*************************************************
-* MD5 Compression Function *
-*************************************************/
+/*
+* MD5 Compression Function
+*/
void MD5::compress_n(const byte input[], u32bit blocks)
{
u32bit A = digest[0], B = digest[1], C = digest[2], D = digest[3];
@@ -109,18 +111,18 @@ void MD5::compress_n(const byte input[], u32bit blocks)
}
}
-/*************************************************
-* Copy out the digest *
-*************************************************/
+/*
+* Copy out the digest
+*/
void MD5::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 MD5::clear() throw()
{
MDx_HashFunction::clear();
diff --git a/src/hash/md5/md5.h b/src/hash/md5/md5.h
index 8ed72b044..85f684d8b 100644
--- a/src/hash/md5/md5.h
+++ b/src/hash/md5/md5.h
@@ -1,6 +1,8 @@
/**
-* MD5 Header File
+* MD5
* (C) 1999-2008 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_MD5_H__