From 469bbcf0701e1eb8a6670c23145b0da87357e178 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 25 Mar 2012 20:00:08 +0000 Subject: Code is all reorganized. We're about ready to release. I should write up a little explenation of the arrangement. --- src/pearsonhash.h | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 src/pearsonhash.h (limited to 'src/pearsonhash.h') diff --git a/src/pearsonhash.h b/src/pearsonhash.h deleted file mode 100644 index 2a9cfa7..0000000 --- a/src/pearsonhash.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2007-2011 Xagasoft, All rights reserved. - * - * This file is part of the libbu++ library and is released under the - * terms of the license contained in the file LICENSE. - */ - -#ifndef BU_PEARSON_HASH_H -#define BU_PEARSON_HASH_H - -#include "bu/cryptohash.h" - -namespace Bu -{ - /** - * A pearson hash is a non-cryptographically secure hashing function that - * is very light on resources, very fast, and produces a single byte - * as it's output. It is strongly dependant on every byte in the input, - * which means that it's a good choice for adding to short messages to - * ensure that the contents of the messages are unchanged. - * - * Pearson hash is named for it's inventor Peter K. Pearson who described - * it in his article "Fast hashing of variable-length text strings" - * published in 1990 by ACM. I haven't read it, because you have to pay to - * get a copy :-P - */ - class PearsonHash : public Bu::CryptoHash - { - public: - PearsonHash(); - virtual ~PearsonHash(); - - virtual void reset(); - virtual void setSalt( const Bu::String &sSalt ); - virtual void addData( const void *sData, int iSize ); - using Bu::CryptoHash::addData; - virtual String getResult(); - virtual void writeResult( Stream &sOut ); - - private: - static uint8_t aSBox[256]; - uint8_t iValue; - }; -}; - -#endif -- cgit v1.2.3