17 #ifndef SERVERINFO_HPP_
18 #define SERVERINFO_HPP_
23 #include <botan/botan.h>
24 #include <botan/base64.h>
33 ServerInfo(
const std::string& host,
const Botan::MemoryVector<std::uint8_t>& publicKey)
34 : host_(host), publicKey_(publicKey) { }
35 ServerInfo(
const std::string& host,
const std::string& publicKey)
36 : host_(host), publicKey_(Botan::base64_decode(publicKey)) { }
39 bool isValid()
const {
return !host_.empty(); }
41 const std::string&
getHost()
const {
return host_; }
42 const Botan::MemoryVector<std::uint8_t>&
getPublicKey()
const {
return publicKey_; }
48 Botan::MemoryVector<std::uint8_t> publicKey_;
const Botan::MemoryVector< std::uint8_t > & getPublicKey() const
ServerInfo(const std::string &host, const std::string &publicKey)
ServerInfo(const std::string &host, const Botan::MemoryVector< std::uint8_t > &publicKey)
const std::string & getHost() const