Rudiments
sha1.h
1 // Copyright (c) 2016 David Muse
2 // See the COPYING file for more information.
3 
4 #ifndef RUDIMENTS_SHA1_H
5 #define RUDIMENTS_SHA1_H
6 
7 #include <rudiments/private/sha1includes.h>
8 
9 class sha1private;
10 
12 enum sha1error {
13  SHA1_ERROR_SUCCESS=0,
14  SHA1_ERROR_NULL,
15  SHA1_ERROR_INPUT_TOO_LONG,
16  SHA1_ERROR_STATE_ERROR
17 };
18 
20 class RUDIMENTS_DLLSPEC sha1 {
21  public:
23  sha1();
24 
26  virtual ~sha1();
27 
31  bool append(const unsigned char *data, uint32_t length);
32 
36  const unsigned char *getHash();
37 
39  uint32_t getHashLength();
40 
44  bool clear();
45 
47  sha1error getError();
48 
49  #include <rudiments/private/sha1.h>
50 };
51 
52 #endif
Definition: sha1.h:20