aboutsummaryrefslogtreecommitdiffstats
path: root/sample
diff options
context:
space:
mode:
Diffstat (limited to 'sample')
-rw-r--r--sample/bls_smpl.cpp2
-rw-r--r--sample/bls_tool.cpp5
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);
}