Common/Exchange/EncryptUtil.h

Go to the documentation of this file.
00001 //-------------------------------------------------------------------
00004 //  Copyright (c) 2007 Celeritive Technologies, Inc.
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License, or (at your option) any later version.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00019 //
00020 //-------------------------------------------------------------------
00021 #pragma once
00022 #ifndef VOLUMILL_ENCRYPTUTIL_H
00023 #define VOLUMILL_ENCRYPTUTIL_H
00024 
00025 namespace exchange
00026 {
00027    bool getPublicKey(const std::string& hostname, int port, const std::string& uri, std::string* pKey);
00028    void getPrivateKey(const std::string& filename, std::string* pKey);
00029    void hashStringSHA1 (const std::string& input, std::string* pOutput);
00030    void encryptStringRSA (const std::string& input, const std::string& publicKey, std::string* pOutput);
00031    void decryptStringRSA (const std::string& input, const std::string& privateKey, std::string* pOutput);
00032    void makeBlowfishKey (std::string* pKey);
00033    void encryptStringBlowfish (const std::string& input, const std::string& key, std::string* pOutput);
00034    void decryptStringBlowfish (const std::string& input, const std::string& key, std::string* pOutput);
00035    void base64Encode (const std::string& input, std::string* pOutput);
00036    void base64Decode (const std::string& input, std::string* pOutput);
00037 }
00038 #endif

Generated on Tue Jan 29 21:37:56 2008 for VoluMill Universal Client by  doxygen 1.4.6