00001 /* $Id: sha1.hpp 52533 2012-01-07 02:35:17Z shadowmaster $ */ 00002 /* 00003 Copyright (C) 2007 - 2012 by Benoit Timbert <benoit.timbert@free.fr> 00004 Part of the Battle for Wesnoth Project http://www.wesnoth.org/ 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or 00009 (at your option) any later version. 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY. 00012 00013 See the COPYING file for more details. 00014 */ 00015 00016 #ifndef SHA1_H_INCLUDED 00017 #define SHA1_H_INCLUDED 00018 00019 #include <string> 00020 #include "SDL_types.h" 00021 00022 class sha1_hash 00023 { 00024 public: 00025 00026 /** Make a hash from a string */ 00027 sha1_hash(const std::string& str); 00028 00029 /** Display the hash */ 00030 std::string display(); 00031 private: 00032 00033 /** Process the next 512 bits block */ 00034 void next(Uint8 block[64]); 00035 Uint32 H0, H1, H2, H3, H4; 00036 00037 }; 00038 00039 #endif
| Generated by doxygen 1.7.1 on Fri May 25 2012 01:03:10 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |