aboutsummaryrefslogtreecommitdiffstats
path: root/src/bls_if.cpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2016-09-08 08:10:50 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2016-09-08 08:10:50 +0800
commit1ada521ca01a12654337ce292b6c6e6f18a90580 (patch)
tree86ed07977b6d8fc8bf66b90cbedecc45fea5e2c0 /src/bls_if.cpp
parent75208d3bd90a9ce8852850f611b141848f4ef135 (diff)
downloaddexon-bls-1ada521ca01a12654337ce292b6c6e6f18a90580.tar
dexon-bls-1ada521ca01a12654337ce292b6c6e6f18a90580.tar.gz
dexon-bls-1ada521ca01a12654337ce292b6c6e6f18a90580.tar.bz2
dexon-bls-1ada521ca01a12654337ce292b6c6e6f18a90580.tar.lz
dexon-bls-1ada521ca01a12654337ce292b6c6e6f18a90580.tar.xz
dexon-bls-1ada521ca01a12654337ce292b6c6e6f18a90580.tar.zst
dexon-bls-1ada521ca01a12654337ce292b6c6e6f18a90580.zip
avoid copy of instance at Go
Diffstat (limited to 'src/bls_if.cpp')
-rw-r--r--src/bls_if.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/bls_if.cpp b/src/bls_if.cpp
index c8fb5d3..7576c93 100644
--- a/src/bls_if.cpp
+++ b/src/bls_if.cpp
@@ -57,6 +57,10 @@ void blsIdDestroy(blsId *id)
{
delete (bls::Id*)id;
}
+void blsIdCopy(blsId *dst, const blsId *src)
+{
+ *((bls::Id*)dst) = *((const bls::Id*)src);
+}
int blsIdSetStr(blsId *id, const char *buf, size_t bufSize)
{
@@ -82,6 +86,10 @@ void blsSecretKeyDestroy(blsSecretKey *sec)
{
delete (bls::SecretKey*)sec;
}
+void blsSecretKeyCopy(blsSecretKey *dst, const blsSecretKey *src)
+{
+ *((bls::SecretKey*)dst) = *((const bls::SecretKey*)src);
+}
void blsSecretKeyPut(const blsSecretKey *sec)
{
@@ -143,6 +151,10 @@ void blsPublicKeyDestroy(blsPublicKey *pub)
{
delete (bls::PublicKey*)pub;
}
+void blsPublicKeyCopy(blsPublicKey *dst, const blsPublicKey *src)
+{
+ *((bls::PublicKey*)dst) = *((const bls::PublicKey*)src);
+}
void blsPublicKeyPut(const blsPublicKey *pub)
{
std::cout << *(const bls::PublicKey*)pub << std::endl;
@@ -178,6 +190,10 @@ void blsSignDestroy(blsSign *sign)
{
delete (bls::Sign*)sign;
}
+void blsSignCopy(blsSign *dst, const blsSign *src)
+{
+ *((bls::Sign*)dst) = *((const bls::Sign*)src);
+}
void blsSignPut(const blsSign *sign)
{
std::cout << *(const bls::Sign*)sign << std::endl;