mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-15 12:13:24 +00:00
18 lines
300 B
C++
18 lines
300 B
C++
#include <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
|