aboutsummaryrefslogtreecommitdiffstats
path: root/test/bls_test.cpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2016-09-06 17:00:38 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2016-09-06 17:00:38 +0800
commitafc01080302fb3348536782e0af39cfb3943867f (patch)
tree29eb1f57d9e483a15fd2e3626629191d3805b3de /test/bls_test.cpp
parent00c3253835763f5f7da16981719c5e751bf7b3e7 (diff)
downloaddexon-bls-afc01080302fb3348536782e0af39cfb3943867f.tar
dexon-bls-afc01080302fb3348536782e0af39cfb3943867f.tar.gz
dexon-bls-afc01080302fb3348536782e0af39cfb3943867f.tar.bz2
dexon-bls-afc01080302fb3348536782e0af39cfb3943867f.tar.lz
dexon-bls-afc01080302fb3348536782e0af39cfb3943867f.tar.xz
dexon-bls-afc01080302fb3348536782e0af39cfb3943867f.tar.zst
dexon-bls-afc01080302fb3348536782e0af39cfb3943867f.zip
add Secret::set for c api
Diffstat (limited to 'test/bls_test.cpp')
-rw-r--r--test/bls_test.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/bls_test.cpp b/test/bls_test.cpp
index e9ff953..47ba330 100644
--- a/test/bls_test.cpp
+++ b/test/bls_test.cpp
@@ -72,12 +72,21 @@ CYBOZU_TEST_AUTO(k_of_n)
bls::SecretKeyVec msk;
sec0.getMasterSecretKey(msk, k);
+ std::vector<const bls::SecretKey*> pmsk(k);
+ for (size_t i = 0; i < k; i++) {
+ pmsk[i] = &msk[i];
+ }
+
bls::SecretKeyVec allPrvVec(n);
bls::IdVec allIdVec(n);
for (int i = 0; i < n; i++) {
int id = i + 1;
allPrvVec[i].set(msk, id);
allIdVec[i] = id;
+
+ bls::SecretKey p;
+ p.set(&pmsk[0], k, id);
+ CYBOZU_TEST_EQUAL(allPrvVec[i], p);
}
bls::SignVec allSignVec(n);