aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/fork256
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/fork256
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/fork256')
-rw-r--r--src/hash/fork256/fork256.cpp34
-rw-r--r--src/hash/fork256/fork256.h16
2 files changed, 27 insertions, 23 deletions
diff --git a/src/hash/fork256/fork256.cpp b/src/hash/fork256/fork256.cpp
index dc023004d..070c7cf6c 100644
--- a/src/hash/fork256/fork256.cpp
+++ b/src/hash/fork256/fork256.cpp
@@ -1,7 +1,9 @@
-/*************************************************
-* FORK-256 Source File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* FORK-256
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#include <botan/fork256.h>
#include <botan/loadstor.h>
@@ -11,9 +13,9 @@ namespace Botan {
namespace {
-/*************************************************
-* FORK-256 Step Function *
-*************************************************/
+/*
+* FORK-256 Step Function
+*/
inline void step(u32bit& A, u32bit& B, u32bit& C, u32bit& D,
u32bit& E, u32bit& F, u32bit& G, u32bit& H,
u32bit M1, u32bit M2, u32bit D1, u32bit D2)
@@ -37,9 +39,9 @@ inline void step(u32bit& A, u32bit& B, u32bit& C, u32bit& D,
}
-/*************************************************
-* FORK-256 Compression Function *
-*************************************************/
+/*
+* FORK-256 Compression Function
+*/
void FORK_256::compress_n(const byte input[], u32bit blocks)
{
const u32bit DELTA[16] = {
@@ -119,18 +121,18 @@ void FORK_256::compress_n(const byte input[], u32bit blocks)
}
}
-/*************************************************
-* Copy out the digest *
-*************************************************/
+/*
+* Copy out the digest
+*/
void FORK_256::copy_out(byte output[])
{
for(u32bit j = 0; j != OUTPUT_LENGTH; j += 4)
store_be(digest[j/4], output + j);
}
-/*************************************************
-* Clear memory of sensitive data *
-*************************************************/
+/*
+* Clear memory of sensitive data
+*/
void FORK_256::clear() throw()
{
MDx_HashFunction::clear();
diff --git a/src/hash/fork256/fork256.h b/src/hash/fork256/fork256.h
index d27e8693f..70d336cc9 100644
--- a/src/hash/fork256/fork256.h
+++ b/src/hash/fork256/fork256.h
@@ -1,7 +1,9 @@
-/*************************************************
-* FORK-256 Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* FORK-256
+* (C) 1999-2007 Jack Lloyd
+*
+* Distributed under the terms of the Botan license
+*/
#ifndef BOTAN_FORK_256_H__
#define BOTAN_FORK_256_H__
@@ -10,9 +12,9 @@
namespace Botan {
-/*************************************************
-* FORK-256 *
-*************************************************/
+/*
+* FORK-256
+*/
class BOTAN_DLL FORK_256 : public MDx_HashFunction
{
public: