Browse Source

move prehashed enum to common; downside is that including one eddsa.hxx now pulls in all of them

master
Michael Hamburg 9 years ago
parent
commit
a3a2906f81
2 changed files with 2 additions and 2 deletions
  1. +1
    -2
      src/per_curve/eddsa.tmpl.hxx
  2. +1
    -0
      src/public_include/decaf/eddsa.tmpl.hxx

+ 1
- 2
src/per_curve/eddsa.tmpl.hxx View File

@@ -7,6 +7,7 @@
* @warning Experimental! The names, parameter orders etc are likely to change.
*/

#include <decaf/eddsa.hxx>
#include <decaf/decaf_$(gf_bits).hxx>
#include <decaf/eddsa_$(gf_bits).h>

@@ -28,8 +29,6 @@ template <typename Group> struct EdDSA;

/** A public key for crypto over $(name) */
template<> struct EdDSA<$(cxx_ns)> {
enum Prehashed { PURE, PREHASHED };

/** @cond internal */
template<class CRTP, Prehashed> class Signing;


+ 1
- 0
src/public_include/decaf/eddsa.tmpl.hxx View File

@@ -2,6 +2,7 @@
* EdDSA crypto routines, metaheader.
*/

namespace decaf { enum Prehashed { PURE, PREHASHED }; }
$("\n".join([
"#include <decaf/eddsa_%s.hxx>" % g for g in sorted([c["bits"] for _,c in curve.iteritems()])
]))

Loading…
Cancel
Save