diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2017-05-29 05:31:17 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2017-05-29 05:31:17 +0800 |
commit | 14c6246a6ca198a89498d766641b07230e9c647d (patch) | |
tree | 4b8ebda7c87269b300429f91991d1d4119cb8ecd /include/bls/bls.hpp | |
parent | d6de132a2d40e79eaa944999882c484015c3261a (diff) | |
download | dexon-bls-14c6246a6ca198a89498d766641b07230e9c647d.tar dexon-bls-14c6246a6ca198a89498d766641b07230e9c647d.tar.gz dexon-bls-14c6246a6ca198a89498d766641b07230e9c647d.tar.bz2 dexon-bls-14c6246a6ca198a89498d766641b07230e9c647d.tar.lz dexon-bls-14c6246a6ca198a89498d766641b07230e9c647d.tar.xz dexon-bls-14c6246a6ca198a89498d766641b07230e9c647d.tar.zst dexon-bls-14c6246a6ca198a89498d766641b07230e9c647d.zip |
update api
Diffstat (limited to 'include/bls/bls.hpp')
-rw-r--r-- | include/bls/bls.hpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/bls/bls.hpp b/include/bls/bls.hpp index 7e4eaad..bd74f39 100644 --- a/include/bls/bls.hpp +++ b/include/bls/bls.hpp @@ -32,7 +32,7 @@ enum { IoBin = 2, // binary number IoDec = 10, // decimal number IoHex = 16, // hexadecimal number - IoEcComp = 512 // fixed byte representation + IoFixedByteSeq = 512 // fixed byte representation }; namespace impl { @@ -105,7 +105,8 @@ public: @note the value must be less than r */ void set(const uint64_t *p); - + // bufSize is truncted/zero extended to keySize + void setLittleEndian(const void *buf, size_t bufSize); }; /* @@ -125,14 +126,16 @@ public: void getStr(std::string& str, int ioMode = 0) const; void setStr(const std::string& str, int ioMode = 0); /* - initialize secretKey with random number + initialize secretKey with random number and set id = 0 */ void init(); /* - set secretKey with p[0, .., keySize) + set secretKey with p[0, .., keySize) and set id = 0 @note the value must be less than r */ void set(const uint64_t *p); + // bufSize is truncted/zero extended to keySize + void setLittleEndian(const void *buf, size_t bufSize); void getPublicKey(PublicKey& pub) const; // constant time sign void sign(Sign& sign, const std::string& m) const; |