hash.hpp

Go to the documentation of this file.
00001 /* $Id: hash.hpp 52533 2012-01-07 02:35:17Z shadowmaster $ */
00002 /*
00003    Copyright (C) 2008 - 2012 by Thomas Baumhauer <thomas.baumhauer@NOSPAMgmail.com>
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 HASH_HPP_INCLUDED
00017 #define HASH_HPP_INCLUDED
00018 
00019 #include <string>
00020 
00021 namespace util {
00022 
00023 unsigned char* md5(const std::string& input);
00024 int get_iteration_count(const std::string& hash);
00025 std::string get_salt(const std::string& hash);
00026 bool is_valid_hash(const std::string& hash);
00027 std::string encode_hash(unsigned char* input);
00028 std::string create_hash(const std::string& password, const std::string& salt, int iteration_count =10);
00029 
00030 } // namespace util
00031 
00032 #endif // HASH_HPP_INCLUDED
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by doxygen 1.7.1 on Fri May 25 2012 01:03:00 for The Battle for Wesnoth
Gna! | Forum | Wiki | CIA | devdocs