diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-02-11 05:29:41 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-02-11 05:29:41 +0000 |
commit | f4b191f0ea396b58465bfba40749977780a3af58 (patch) | |
tree | 891490e91ab3b67524be67b2b71c85d84fd2f92a /src/old/sha1.h | |
parent | 292ae9453e7fdb2f1023ed9dfc99cbcd751f8b90 (diff) | |
download | libbu++-f4b191f0ea396b58465bfba40749977780a3af58.tar.gz libbu++-f4b191f0ea396b58465bfba40749977780a3af58.tar.bz2 libbu++-f4b191f0ea396b58465bfba40749977780a3af58.tar.xz libbu++-f4b191f0ea396b58465bfba40749977780a3af58.zip |
Just removing some things that are cluttering up the source tree.
Diffstat (limited to 'src/old/sha1.h')
-rw-r--r-- | src/old/sha1.h | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/src/old/sha1.h b/src/old/sha1.h deleted file mode 100644 index ab6081d..0000000 --- a/src/old/sha1.h +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | /* sha1.h | ||
2 | |||
3 | Copyright (c) 2005 Michael D. Leonhard | ||
4 | |||
5 | http://tamale.net/ | ||
6 | |||
7 | This file is licensed under the terms described in the | ||
8 | accompanying LICENSE file. | ||
9 | */ | ||
10 | |||
11 | #ifndef SHA1_H | ||
12 | #define SHA1_H | ||
13 | |||
14 | #include <stdint.h> | ||
15 | |||
16 | /** | ||
17 | * Calculates SHA-1 sums. This is based strongly on code from Michael D. | ||
18 | * Leonhard who released his code under the terms of the MIT license, thank you! | ||
19 | */ | ||
20 | class Sha1 | ||
21 | { | ||
22 | public: | ||
23 | Sha1(); | ||
24 | ~Sha1(); | ||
25 | |||
26 | void update( const char* data, int num ); | ||
27 | unsigned char* getDigest(); | ||
28 | |||
29 | // utility methods | ||
30 | static uint32_t lrot( uint32_t x, int bits ); | ||
31 | static void toBigEndian( uint32_t in, unsigned char* out ); | ||
32 | |||
33 | private: | ||
34 | // fields | ||
35 | uint32_t H0, H1, H2, H3, H4; | ||
36 | unsigned char bytes[64]; | ||
37 | int unprocessedBytes; | ||
38 | uint32_t size; | ||
39 | void process(); | ||
40 | }; | ||
41 | |||
42 | #endif | ||