Browse Source

encoding is no longer EXPLICIT_CON

master
Michael Hamburg 9 years ago
parent
commit
02449ed54b
2 changed files with 5 additions and 10 deletions
  1. +2
    -10
      include/decaf_255.hxx
  2. +3
    -0
      include/shake.hxx

+ 2
- 10
include/decaf_255.hxx View File

@@ -39,14 +39,8 @@
/** @cond internal */ /** @cond internal */
#if __cplusplus >= 201103L #if __cplusplus >= 201103L
#define NOEXCEPT noexcept #define NOEXCEPT noexcept
#define EXPLICIT_CON explicit
#define FINAL final
#define DELETE = delete
#else #else
#define NOEXCEPT throw() #define NOEXCEPT throw()
#define EXPLICIT_CON
#define FINAL
#define DELETE
#endif #endif
/** @endcond */ /** @endcond */


@@ -139,7 +133,7 @@ public:
} }
/** @brief Encode to fixed-length string */ /** @brief Encode to fixed-length string */
inline EXPLICIT_CON operator SecureBuffer() const NOEXCEPT {
inline operator SecureBuffer() const NOEXCEPT {
SecureBuffer buf(SER_BYTES); decaf_255_scalar_encode(buf,s); return buf; SecureBuffer buf(SER_BYTES); decaf_255_scalar_encode(buf,s); return buf;
} }
@@ -331,7 +325,7 @@ public:
/** /**
* @brief Encode to string. The identity encodes to the all-zero string. * @brief Encode to string. The identity encodes to the all-zero string.
*/ */
inline EXPLICIT_CON operator SecureBuffer() const NOEXCEPT {
inline operator SecureBuffer() const NOEXCEPT {
SecureBuffer buffer(SER_BYTES); SecureBuffer buffer(SER_BYTES);
decaf_255_point_encode(buffer, p); decaf_255_point_encode(buffer, p);
return buffer; return buffer;
@@ -594,8 +588,6 @@ public:
}; /* struct Decaf255 */ }; /* struct Decaf255 */


#undef NOEXCEPT #undef NOEXCEPT
#undef EXPLICIT_CON
#undef FINAL
} /* namespace decaf */ } /* namespace decaf */


#endif /* __DECAF_255_HXX__ */ #endif /* __DECAF_255_HXX__ */

+ 3
- 0
include/shake.hxx View File

@@ -19,8 +19,10 @@
/** @cond internal */ /** @cond internal */
#if __cplusplus >= 201103L #if __cplusplus >= 201103L
#define NOEXCEPT noexcept #define NOEXCEPT noexcept
#define DELETE = delete
#else #else
#define NOEXCEPT throw() #define NOEXCEPT throw()
#define DELETE
#endif #endif
/** @endcond */ /** @endcond */


@@ -341,5 +343,6 @@ public:
} /* namespace decaf */ } /* namespace decaf */


#undef NOEXCEPT #undef NOEXCEPT
#undef DELETE


#endif /* __SHAKE_HXX__ */ #endif /* __SHAKE_HXX__ */

Loading…
Cancel
Save