mirror of https://github.com/oxen-io/lokinet
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
306 B
C++
18 lines
306 B
C++
6 years ago
|
#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
|