mirror of https://github.com/PurpleI2P/i2pd.git
I2P: End-to-End encrypted and anonymous Internet
https://i2pd.website/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
427 B
31 lines
427 B
5 years ago
|
#include "Elligator.h"
|
||
|
|
||
|
namespace i2p
|
||
|
{
|
||
|
namespace crypto
|
||
|
{
|
||
|
Elligator2::Elligator2 ()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
Elligator2::~Elligator2 ()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
static std::unique_ptr<Elligator2> g_Elligator;
|
||
|
std::unique_ptr<Elligator2>& GetElligator ()
|
||
|
{
|
||
|
if (!g_Elligator)
|
||
|
{
|
||
|
auto el = new Elligator2();
|
||
|
if (!g_Elligator) // make sure it was not created already
|
||
|
g_Elligator.reset (el);
|
||
|
else
|
||
|
delete el;
|
||
|
}
|
||
|
return g_Elligator;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|