diff --git a/include/mcl/bn.hpp b/include/mcl/bn.hpp index 74eace9..c74840c 100644 --- a/include/mcl/bn.hpp +++ b/include/mcl/bn.hpp @@ -527,12 +527,12 @@ struct MapTo { bool setMapToMode(int mode) { if (type_ == STD_ECtype) { - mapToMode_ = MCL_MAP_TO_TRY_AND_INC; + mapToMode_ = MCL_MAP_TO_MODE_TRY_AND_INC; return true; } switch (mode) { case MCL_MAP_TO_MODE_ORIGINAL: - case MCL_MAP_TO_TRY_AND_INC: + case MCL_MAP_TO_MODE_TRY_AND_INC: case MCL_MAP_TO_MODE_ETH2: mapToMode_ = mode; return true; @@ -569,7 +569,7 @@ struct MapTo { template bool mapToEc(G& P, const F& t) const { - if (mapToMode_ == MCL_MAP_TO_TRY_AND_INC || mapToMode_ == MCL_MAP_TO_MODE_ETH2) { + if (mapToMode_ == MCL_MAP_TO_MODE_TRY_AND_INC || mapToMode_ == MCL_MAP_TO_MODE_ETH2) { naiveMapTo(P, t); } else { if (!calcBN(P, t)) return false; diff --git a/include/mcl/curve_type.h b/include/mcl/curve_type.h index 1f551d7..dca749d 100644 --- a/include/mcl/curve_type.h +++ b/include/mcl/curve_type.h @@ -38,6 +38,6 @@ enum { enum { MCL_MAP_TO_MODE_ORIGINAL, // see MapTo::calcBN - MCL_MAP_TO_TRY_AND_INC, // try-and-incremental-x + MCL_MAP_TO_MODE_TRY_AND_INC, // try-and-incremental-x MCL_MAP_TO_MODE_ETH2 // eth2.0 spec };