class DecafED25519DNSCryptoKeyEngine : public DNSCryptoKeyEngine
{
public:
- explicit DecafED25519DNSCryptoKeyEngine(unsigned int algo) : DNSCryptoKeyEngine(algo)
+ explicit DecafED25519DNSCryptoKeyEngine(unsigned int algo) :
+ DNSCryptoKeyEngine(algo)
{
-
}
string getName() const override { return "Decaf ED25519"; }
void create(unsigned int bits) override;
void DecafED25519DNSCryptoKeyEngine::create(unsigned int bits)
{
- if(bits != (unsigned int)getBits()) {
- throw runtime_error("Unsupported key length of "+std::to_string(bits)+" bits requested, DecafED25519 class");
+ if (bits != (unsigned int)getBits()) {
+ throw runtime_error("Unsupported key length of " + std::to_string(bits) + " bits requested, DecafED25519 class");
}
SpongeRng rng("/dev/urandom");
return storvector;
}
-void DecafED25519DNSCryptoKeyEngine::fromISCMap(DNSKEYRecordContent& drc, std::map<std::string, std::string>& stormap )
+void DecafED25519DNSCryptoKeyEngine::fromISCMap(DNSKEYRecordContent& drc, std::map<std::string, std::string>& stormap)
{
/*
Private-key-format: v1.2
try {
pub.verify(sig, message);
- } catch(const CryptoException& e) {
+ }
+ catch (const CryptoException& e) {
return false;
}
return true;
}
-
class DecafED448DNSCryptoKeyEngine : public DNSCryptoKeyEngine
{
public:
- explicit DecafED448DNSCryptoKeyEngine(unsigned int algo) : DNSCryptoKeyEngine(algo)
+ explicit DecafED448DNSCryptoKeyEngine(unsigned int algo) :
+ DNSCryptoKeyEngine(algo)
{
-
}
string getName() const override { return "Decaf ED448"; }
void create(unsigned int bits) override;
void DecafED448DNSCryptoKeyEngine::create(unsigned int bits)
{
- if(bits != (unsigned int)getBits()) {
- throw runtime_error("Unsupported key length of "+std::to_string(bits)+" bits requested, DecafED448 class");
+ if (bits != (unsigned int)getBits()) {
+ throw runtime_error("Unsupported key length of " + std::to_string(bits) + " bits requested, DecafED448 class");
}
SpongeRng rng("/dev/urandom");
return storvector;
}
-void DecafED448DNSCryptoKeyEngine::fromISCMap(DNSKEYRecordContent& drc, std::map<std::string, std::string>& stormap )
+void DecafED448DNSCryptoKeyEngine::fromISCMap(DNSKEYRecordContent& drc, std::map<std::string, std::string>& stormap)
{
/*
Private-key-format: v1.2
try {
pub.verify(sig, message);
- } catch(const CryptoException& e) {
+ }
+ catch (const CryptoException& e) {
return false;
}
return true;
}
-
-namespace {
+namespace
+{
struct LoaderDecafStruct
{
LoaderDecafStruct()