From a3a2906f817df4c3d1a41693bec4be7bef651e1b Mon Sep 17 00:00:00 2001 From: Michael Hamburg Date: Tue, 1 Mar 2016 17:07:54 -0800 Subject: [PATCH] move prehashed enum to common; downside is that including one eddsa.hxx now pulls in all of them --- src/per_curve/eddsa.tmpl.hxx | 3 +-- src/public_include/decaf/eddsa.tmpl.hxx | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/per_curve/eddsa.tmpl.hxx b/src/per_curve/eddsa.tmpl.hxx index b424ee6..e5382de 100644 --- a/src/per_curve/eddsa.tmpl.hxx +++ b/src/per_curve/eddsa.tmpl.hxx @@ -7,6 +7,7 @@ * @warning Experimental! The names, parameter orders etc are likely to change. */ +#include #include #include @@ -28,8 +29,6 @@ template struct EdDSA; /** A public key for crypto over $(name) */ template<> struct EdDSA<$(cxx_ns)> { - -enum Prehashed { PURE, PREHASHED }; /** @cond internal */ template class Signing; diff --git a/src/public_include/decaf/eddsa.tmpl.hxx b/src/public_include/decaf/eddsa.tmpl.hxx index 08fa7cc..8325f24 100644 --- a/src/public_include/decaf/eddsa.tmpl.hxx +++ b/src/public_include/decaf/eddsa.tmpl.hxx @@ -2,6 +2,7 @@ * EdDSA crypto routines, metaheader. */ +namespace decaf { enum Prehashed { PURE, PREHASHED }; } $("\n".join([ "#include " % g for g in sorted([c["bits"] for _,c in curve.iteritems()]) ]))