lokinet/llarp/crypto.cpp
2018-12-10 12:22:59 -05:00

18 lines
306 B
C++

#include <llarp/crypto.hpp>
namespace llarp
{
bool
PubKey::FromString(const std::string& str)
{
return HexDecode(str.c_str(), data(), size());
}
std::string
PubKey::ToString() const
{
char buf[(PUBKEYSIZE + 1) * 2] = {0};
return HexEncode(*this, buf);
}
} // namespace llarp