• Main Page
  • Classes
  • Files
  • File List

Swiften/StringCodecs/MD5.h

00001 /*
00002  * Copyright (c) 2010-2012 Remko Tronçon
00003  * Licensed under the GNU General Public License v3.
00004  * See Documentation/Licenses/GPLv3.txt for more information.
00005  */
00006 
00007 #pragma once
00008 
00009 #include <Swiften/Base/API.h>
00010 #include <Swiften/Base/ByteArray.h>
00011 #include <Swiften/Base/SafeByteArray.h>
00012 
00013 namespace Swift {
00014   struct md5_state_s;
00015 
00016   class SWIFTEN_API MD5 {
00017     public:
00018       MD5();
00019       ~MD5();
00020 
00021       MD5& update(const std::vector<unsigned char>& data);
00022       std::vector<unsigned char> getHash();
00023 
00024       static ByteArray getHash(const ByteArray& data);
00025       static ByteArray getHash(const SafeByteArray& data);
00026       static bool isAllowedForCrypto();
00027 
00028     private:
00029       md5_state_s* state;
00030   };
00031 }

Generated on Fri Oct 12 2012 21:00:19 for Swiften by  doxygen 1.7.1