123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- #ifndef EPID_COMMON_TESTHELPER_FFELEMENT_WRAPPER_TESTHELPER_H_
- #define EPID_COMMON_TESTHELPER_FFELEMENT_WRAPPER_TESTHELPER_H_
- #include <memory>
- #include <vector>
- extern "C" {
- #include "epid/common/1.1/types.h"
- #include "epid/common/math/bignum.h"
- #include "epid/common/math/finitefield.h"
- }
- class FiniteFieldObj;
- class FfElementObj {
- public:
-
- FfElementObj();
-
- FfElementObj(FfElementObj const& other);
-
- FfElementObj& operator=(FfElementObj const& other);
-
- explicit FfElementObj(FiniteFieldObj* ff);
-
- FfElementObj(FiniteFieldObj* ff, FpElemStr const& bytes);
-
- FfElementObj(FiniteFieldObj* ff, FqElemStr const& bytes);
-
- FfElementObj(FiniteFieldObj* ff, Fq2ElemStr const& bytes);
-
- FfElementObj(FiniteFieldObj* ff, Fq3ElemStr const& bytes);
-
- FfElementObj(FiniteFieldObj* ff, Fq6ElemStr const& bytes);
-
- FfElementObj(FiniteFieldObj* ff, Fq12ElemStr const& bytes);
-
- FfElementObj(FiniteFieldObj* ff, std::vector<unsigned char> const& bytes);
-
- FfElementObj(FiniteFieldObj* ff, void const* bytes, size_t size);
-
- ~FfElementObj();
-
- operator FfElement*();
-
- operator const FfElement*() const;
-
- FfElement* get();
-
- FfElement const* getc() const;
-
- std::vector<unsigned char> data() const;
- private:
- void init(FiniteFieldObj* ff, unsigned char const* bytes, size_t size);
- struct State;
- std::unique_ptr<State> state_;
- };
- #endif
|