diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2015-05-01 19:31:32 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2015-05-01 19:31:32 +0200 |
commit | 84c42bcc329a10325c846c6f46d580750bc39853 (patch) | |
tree | 27c5f2432ecda8a9de30319390ba38a9a78715d3 /3rdParty/sha1/sha1.h | |
parent | 1c58fa7c64843b2655152aed48d0c3dcaa2e28c2 (diff) | |
download | aCms-84c42bcc329a10325c846c6f46d580750bc39853.tar.gz aCms-84c42bcc329a10325c846c6f46d580750bc39853.tar.bz2 |
replace sha1 with crypto++ SHA-256
Diffstat (limited to '3rdParty/sha1/sha1.h')
-rw-r--r-- | 3rdParty/sha1/sha1.h | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/3rdParty/sha1/sha1.h b/3rdParty/sha1/sha1.h deleted file mode 100644 index c0efa1c..0000000 --- a/3rdParty/sha1/sha1.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * sha1.h - * - * Copyright (C) 1998, 2009 - * Paul E. Jones <paulej@packetizer.com> - * All Rights Reserved. - * - ***************************************************************************** - * $Id: sha1.h 12 2009-06-22 19:34:25Z paulej $ - ***************************************************************************** - * - * Description: - * This class implements the Secure Hashing Standard as defined - * in FIPS PUB 180-1 published April 17, 1995. - * - * Many of the variable names in this class, especially the single - * character names, were used because those were the names used - * in the publication. - * - * Please read the file sha1.cpp for more information. - * - */ - -#ifndef _SHA1_H_ -#define _SHA1_H_ - -class SHA1 -{ - - public: - - SHA1(); - virtual ~SHA1(); - - /* - * Re-initialize the class - */ - void Reset(); - - /* - * Returns the message digest - */ - bool Result(unsigned *message_digest_array); - - /* - * Provide input to SHA1 - */ - void Input( const unsigned char *message_array, - unsigned length); - void Input( const char *message_array, - unsigned length); - void Input(unsigned char message_element); - void Input(char message_element); - SHA1& operator<<(const char *message_array); - SHA1& operator<<(const unsigned char *message_array); - SHA1& operator<<(const char message_element); - SHA1& operator<<(const unsigned char message_element); - - private: - - /* - * Process the next 512 bits of the message - */ - void ProcessMessageBlock(); - - /* - * Pads the current message block to 512 bits - */ - void PadMessage(); - - /* - * Performs a circular left shift operation - */ - inline unsigned CircularShift(int bits, unsigned word); - - unsigned H[5]; // Message digest buffers - - unsigned Length_Low; // Message length in bits - unsigned Length_High; // Message length in bits - - unsigned char Message_Block[64]; // 512-bit message blocks - int Message_Block_Index; // Index into message block array - - bool Computed; // Is the digest computed? - bool Corrupted; // Is the message digest corruped? - -}; - -#endif |