The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
sha1.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2007 - 2016 by Benoit Timbert <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #ifndef SHA1_H_INCLUDED
16 #define SHA1_H_INCLUDED
17 
18 #include <string>
19 #include <SDL_types.h>
20 
21 class sha1_hash
22 {
23 public:
24 
25  /** Make a hash from a string */
26  sha1_hash(const std::string& str);
27 
28  /** Display the hash */
30 private:
31 
32  /** Process the next 512 bits block */
33  void next(Uint8 block[64]);
34  Uint32 H0, H1, H2, H3, H4;
35 
36 };
37 
38 #endif
Uint32 H1
Definition: sha1.hpp:34
Uint32 H0
Definition: sha1.hpp:34
Uint32 H4
Definition: sha1.hpp:34
Uint32 H3
Definition: sha1.hpp:34
std::string display()
Display the hash.
Definition: sha1.cpp:40
void next(Uint8 block[64])
Process the next 512 bits block.
Definition: sha1.cpp:111
Uint32 H2
Definition: sha1.hpp:34
sha1_hash(const std::string &str)
Make a hash from a string.
Definition: sha1.cpp:50
static void block(LexState *ls)
Definition: lparser.cpp:1081
GLsizei const GLcharARB ** string
Definition: glew.h:4503