Rudiments
hash.h
1 // Copyright (c) 2016 David Muse
2 // See the COPYING file for more information.
3 
4 #ifndef RUDIMENTS_HASH_H
5 #define RUDIMENTS_HASH_H
6 
7 #include <rudiments/private/hashincludes.h>
8 
10 enum hasherror_t {
11  HASH_ERROR_SUCCESS=0,
12  HASH_ERROR_NULL,
13  HASH_ERROR_INPUT_TOO_LONG,
14  HASH_ERROR_STATE_ERROR
15 };
16 
18 class RUDIMENTS_DLLSPEC hash {
19  public:
21  hash() {};
22 
24  virtual ~hash() {};
25 
29  virtual bool append(const unsigned char *data,
30  uint32_t length)=0;
31 
35  virtual const unsigned char *getHash()=0;
36 
38  virtual uint32_t getHashLength()=0;
39 
43  virtual bool clear()=0;
44 
46  virtual hasherror_t getError()=0;
47 };
48 
49 #endif
hash()
Definition: hash.h:21
Definition: hash.h:18
virtual ~hash()
Definition: hash.h:24