20 #include <botan/botan.h>
23 #include <boost/cstdint.hpp>
24 #include <boost/scoped_array.hpp>
28 typedef std::pair<Botan::MemoryVector<boost::uint8_t>, std::string>
KeyPair;
48 static Botan::MemoryVector<boost::uint8_t>
loadPublicKey(
const std::string& fileName);
52 static KeyPair loadKeyPair(
const std::string& pubFileName,
const std::string& privFileName);
54 static void saveKeyPair(
const KeyPair& pair,
const std::string& pubFileName,
const std::string& privFileName);
56 static void savePublicKey(
const Botan::MemoryVector<boost::uint8_t>& key,
const std::string& pubFileName);
58 static void savePrivateKey(
const std::string& key,
const std::string& privFileName);
61 static void readFile(
const std::string& fileName, boost::scoped_array<char>& buf,
size_t& len);
64 Botan::AutoSeeded_RNG rng_;
std::pair< Botan::MemoryVector< boost::uint8_t >, std::string > KeyPair
static KeyPair loadKeyPair(const std::string &pubFileName, const std::string &privFileName)
static void savePublicKey(const Botan::MemoryVector< boost::uint8_t > &key, const std::string &pubFileName)
KeyPair generateKeyPair(size_t length)
static std::string loadPrivateKey(const std::string &fileName)
static void savePrivateKey(const std::string &key, const std::string &privFileName)
static void saveKeyPair(const KeyPair &pair, const std::string &pubFileName, const std::string &privFileName)
static Botan::MemoryVector< boost::uint8_t > loadPublicKey(const std::string &fileName)
Botan::SymmetricKey generateSessionKey(size_t length)