diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2018-08-13 14:11:14 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2018-08-13 14:11:14 +0800 |
commit | f25b779d48f3682a03a001f8ce0386eebd43de68 (patch) | |
tree | a95fec80bd35fcbd927ccd14659b40b3a5db7b98 /src/bls.cpp | |
parent | 56dd66510ebc611f8befbd5b22cb061616756491 (diff) | |
download | dexon-bls-f25b779d48f3682a03a001f8ce0386eebd43de68.tar dexon-bls-f25b779d48f3682a03a001f8ce0386eebd43de68.tar.gz dexon-bls-f25b779d48f3682a03a001f8ce0386eebd43de68.tar.bz2 dexon-bls-f25b779d48f3682a03a001f8ce0386eebd43de68.tar.lz dexon-bls-f25b779d48f3682a03a001f8ce0386eebd43de68.tar.xz dexon-bls-f25b779d48f3682a03a001f8ce0386eebd43de68.tar.zst dexon-bls-f25b779d48f3682a03a001f8ce0386eebd43de68.zip |
add getG1/FrByteSize
Diffstat (limited to 'src/bls.cpp')
-rw-r--r-- | src/bls.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/bls.cpp b/src/bls.cpp index 5bfb744..d83b259 100644 --- a/src/bls.cpp +++ b/src/bls.cpp @@ -7,6 +7,7 @@ #include <cybozu/crypto.hpp> #include <vector> #include <string> +#define MCLBN_NO_AUTOLINK #include <bls/bls.hpp> #if MCLBN_FP_UNIT_SIZE == 4 #include <mcl/bn256.hpp> @@ -206,6 +207,16 @@ void getFieldOrder(std::string& str) Fp::getModulo(str); } +int getG1ByteSize() +{ + return (int)Fp::getByteSize(); +} + +int getFrByteSize() +{ + return (int)Fr::getByteSize(); +} + Id::Id(unsigned int id) { getInner().v = id; |