aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-03-27 20:07:00 +0000
committerlloyd <[email protected]>2009-03-27 20:07:00 +0000
commit3246455af96873602d815aa46f6ff6ae2266241a (patch)
treeab0f7cdf96b3f57d09a854f52723fd075fec4325
parent7097612ae6fafa2d9acc02d2c383e71c2d87af0c (diff)
No reason to include mdx_hash.h in MD2 since it derives directly from
HashFunction; include hash.h instead
-rw-r--r--src/hash/md2/md2.cpp32
-rw-r--r--src/hash/md2/md2.h16
2 files changed, 24 insertions, 24 deletions
diff --git a/src/hash/md2/md2.cpp b/src/hash/md2/md2.cpp
index c609eda10..fbc40fa93 100644
--- a/src/hash/md2/md2.cpp
+++ b/src/hash/md2/md2.cpp
@@ -1,16 +1,16 @@
-/*************************************************
-* MD2 Source File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* MD2 Source File
+* (C) 1999-2007 Jack Lloyd
+*/
#include <botan/md2.h>
#include <botan/xor_buf.h>
namespace Botan {
-/*************************************************
-* MD2 Compression Function *
-*************************************************/
+/**
+* MD2 Compression Function
+*/
void MD2::hash(const byte input[])
{
static const byte SBOX[256] = {
@@ -56,9 +56,9 @@ void MD2::hash(const byte input[])
T = checksum[j] ^= SBOX[input[j] ^ T];
}
-/*************************************************
-* Update the hash *
-*************************************************/
+/**
+* Update the hash
+*/
void MD2::add_data(const byte input[], u32bit length)
{
buffer.copy(position, input, length);
@@ -79,9 +79,9 @@ void MD2::add_data(const byte input[], u32bit length)
position += length;
}
-/*************************************************
-* Finalize a MD2 Hash *
-*************************************************/
+/**
+* Finalize a MD2 Hash
+*/
void MD2::final_result(byte output[])
{
for(u32bit j = position; j != HASH_BLOCK_SIZE; ++j)
@@ -92,9 +92,9 @@ void MD2::final_result(byte output[])
clear();
}
-/*************************************************
-* Clear memory of sensitive data *
-*************************************************/
+/**
+* Clear memory of sensitive data
+*/
void MD2::clear() throw()
{
X.clear();
diff --git a/src/hash/md2/md2.h b/src/hash/md2/md2.h
index 2c53d1cf0..4d06c8872 100644
--- a/src/hash/md2/md2.h
+++ b/src/hash/md2/md2.h
@@ -1,18 +1,18 @@
-/*************************************************
-* MD2 Header File *
-* (C) 1999-2007 Jack Lloyd *
-*************************************************/
+/*
+* MD2 Header File
+* (C) 1999-2007 Jack Lloyd
+*/
#ifndef BOTAN_MD2_H__
#define BOTAN_MD2_H__
-#include <botan/mdx_hash.h>
+#include <botan/hash.h>
namespace Botan {
-/*************************************************
-* MD2 *
-*************************************************/
+/*
+* MD2
+*/
class BOTAN_DLL MD2 : public HashFunction
{
public: