diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2016-08-31 09:59:53 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2016-08-31 09:59:53 +0800 |
commit | dc508d1ff0607285d8b4df8a71805be28ef5b8f5 (patch) | |
tree | 60f2efa81fc455e3feced9519e90c5592f022d4e /sample | |
parent | 81e88d1c6d9fca8f92787cab308deceb2861b6c3 (diff) | |
download | dexon-bls-dc508d1ff0607285d8b4df8a71805be28ef5b8f5.tar dexon-bls-dc508d1ff0607285d8b4df8a71805be28ef5b8f5.tar.gz dexon-bls-dc508d1ff0607285d8b4df8a71805be28ef5b8f5.tar.bz2 dexon-bls-dc508d1ff0607285d8b4df8a71805be28ef5b8f5.tar.lz dexon-bls-dc508d1ff0607285d8b4df8a71805be28ef5b8f5.tar.xz dexon-bls-dc508d1ff0607285d8b4df8a71805be28ef5b8f5.tar.zst dexon-bls-dc508d1ff0607285d8b4df8a71805be28ef5b8f5.zip |
always hex string with prefix 0x
Diffstat (limited to 'sample')
-rw-r--r-- | sample/bls_smpl.cpp | 2 | ||||
-rw-r--r-- | sample/bls_tool.cpp | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sample/bls_smpl.cpp b/sample/bls_smpl.cpp index dd73ed3..f87294b 100644 --- a/sample/bls_smpl.cpp +++ b/sample/bls_smpl.cpp @@ -21,7 +21,7 @@ void save(const std::string& file, const T& t, const bls::Id& id = 0) { const std::string name = makeName(file, id); std::ofstream ofs(name.c_str(), std::ios::binary); - if (!(ofs << std::hex << std::showbase << t)) { + if (!(ofs << t)) { throw cybozu::Exception("can't save") << name; } } diff --git a/sample/bls_tool.cpp b/sample/bls_tool.cpp index 2dae6d4..a5c2abd 100644 --- a/sample/bls_tool.cpp +++ b/sample/bls_tool.cpp @@ -95,12 +95,13 @@ void recover_sig() size_t k; read(k); bls::SecretKeyVec msk(k); + bls::IdVec idVec(k); for (size_t i = 0; i < k; i++) { - read(msk[i].id); + read(idVec[i]); read(msk[i]); } bls::SecretKey sec; - sec.recover(msk); + sec.recover(msk, idVec); write(sec); } |