aboutsummaryrefslogtreecommitdiffstats
path: root/src/bls_if.cpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2016-09-06 16:40:22 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2016-09-06 16:40:22 +0800
commit00c3253835763f5f7da16981719c5e751bf7b3e7 (patch)
tree8899cf0b8c2c71d26fded6114aa56fd00e31ef46 /src/bls_if.cpp
parent1a4fb4458cbf69628a541c3957b53e01ea661cd4 (diff)
downloaddexon-bls-00c3253835763f5f7da16981719c5e751bf7b3e7.tar
dexon-bls-00c3253835763f5f7da16981719c5e751bf7b3e7.tar.gz
dexon-bls-00c3253835763f5f7da16981719c5e751bf7b3e7.tar.bz2
dexon-bls-00c3253835763f5f7da16981719c5e751bf7b3e7.tar.lz
dexon-bls-00c3253835763f5f7da16981719c5e751bf7b3e7.tar.xz
dexon-bls-00c3253835763f5f7da16981719c5e751bf7b3e7.tar.zst
dexon-bls-00c3253835763f5f7da16981719c5e751bf7b3e7.zip
add Add(rhs) method
Diffstat (limited to 'src/bls_if.cpp')
-rw-r--r--src/bls_if.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bls_if.cpp b/src/bls_if.cpp
index 8cd4916..4315fad 100644
--- a/src/bls_if.cpp
+++ b/src/bls_if.cpp
@@ -101,6 +101,10 @@ void blsSecretKeyInit(blsSecretKey *sec)
{
((bls::SecretKey*)sec)->init();
}
+void blsSecretKeyAdd(blsSecretKey *sec, const blsSecretKey *rhs)
+{
+ ((bls::SecretKey*)sec)->add(*(const bls::SecretKey*)rhs);
+}
void blsSecretKeyGetPublicKey(const blsSecretKey *sec, blsPublicKey *pub)
{
@@ -133,6 +137,10 @@ size_t blsPublicKeyGetStr(const blsPublicKey *pub, char *buf, size_t maxBufSize)
{
return getStrT<bls::PublicKey, blsPublicKey>(pub, buf, maxBufSize);
}
+void blsPublicKeyAdd(blsPublicKey *pub, const blsPublicKey *rhs)
+{
+ ((bls::PublicKey*)pub)->add(*(const bls::PublicKey*)rhs);
+}
blsSign *blsSignCreate()
{
@@ -156,6 +164,10 @@ size_t blsSignGetStr(const blsSign *sign, char *buf, size_t maxBufSize)
{
return getStrT<bls::Sign, blsSign>(sign, buf, maxBufSize);
}
+void blsSignAdd(blsSign *sign, const blsSign *rhs)
+{
+ ((bls::Sign*)sign)->add(*(const bls::Sign*)rhs);
+}
int blsSignVerify(const blsSign *sign, const blsPublicKey *pub, const char *m, size_t size)
{