diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-02-19 23:44:57 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-02-19 23:44:57 +0000 |
commit | 4309066dff46f52690998bbd1f60ec8b1631f142 (patch) | |
tree | 07b6092622c909351f20590e7ee96d07f5b2d010 /src/cryptohash.h | |
parent | 3f958097632256329cdbaf2219e2ba15325e9c52 (diff) | |
download | libbu++-4309066dff46f52690998bbd1f60ec8b1631f142.tar.gz libbu++-4309066dff46f52690998bbd1f60ec8b1631f142.tar.bz2 libbu++-4309066dff46f52690998bbd1f60ec8b1631f142.tar.xz libbu++-4309066dff46f52690998bbd1f60ec8b1631f142.zip |
We have the new Bu::CryptoHash base class and Bu::Md5 is here and ready
to rock. sha1 is still only a shell, I dunno if/when I'm going to implement
that one.
So far Bu::Md5 is 100% compatible with md5sum in all tests performed so far, in
fact the test program's output is compatible with md5sum in every way (and it's
so cute and little too!)
Oh, minor update for stdstream and the formatter, they can handle more handy
types now.
Diffstat (limited to 'src/cryptohash.h')
-rw-r--r-- | src/cryptohash.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/cryptohash.h b/src/cryptohash.h new file mode 100644 index 0000000..01d4634 --- /dev/null +++ b/src/cryptohash.h | |||
@@ -0,0 +1,22 @@ | |||
1 | #ifndef BU_CRYPTO_HASH_H | ||
2 | #define BU_CRYPTO_HASH_H | ||
3 | |||
4 | #include "bu/fstring.h" | ||
5 | |||
6 | namespace Bu | ||
7 | { | ||
8 | class CryptoHash | ||
9 | { | ||
10 | public: | ||
11 | CryptoHash(); | ||
12 | virtual ~CryptoHash(); | ||
13 | |||
14 | virtual void reset() = 0; | ||
15 | virtual void setSalt( const Bu::FString &sSalt ) = 0; | ||
16 | virtual void addData( const char *sData, int iSize ) = 0; | ||
17 | virtual void addData( const Bu::FString &sData ); | ||
18 | virtual FString getResult() = 0; | ||
19 | }; | ||
20 | }; | ||
21 | |||
22 | #endif | ||