s.fisco-bcos-tars-sdk.3.5.0.source-code.SignatureCrypto Maven / Gradle / Ivy
The newest version!
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.1.1
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package org.fisco.bcos.sdk.tars;
public class SignatureCrypto {
private transient long swigCPtr;
private transient boolean swigCMemOwn;
protected SignatureCrypto(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(SignatureCrypto obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void swigSetCMemOwn(boolean own) {
swigCMemOwn = own;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
bcosJNI.delete_SignatureCrypto(swigCPtr);
}
swigCPtr = 0;
}
}
public SWIGTYPE_p_std__shared_ptrT_bytes_t sign(KeyPairInterface _keyPair, SWIGTYPE_p_HashType _hash, boolean _signatureWithPub) {
return new SWIGTYPE_p_std__shared_ptrT_bytes_t(bcosJNI.SignatureCrypto_sign__SWIG_0(swigCPtr, this, KeyPairInterface.getCPtr(_keyPair), _keyPair, SWIGTYPE_p_HashType.getCPtr(_hash), _signatureWithPub), true);
}
public SWIGTYPE_p_std__shared_ptrT_bytes_t sign(KeyPairInterface _keyPair, SWIGTYPE_p_HashType _hash) {
return new SWIGTYPE_p_std__shared_ptrT_bytes_t(bcosJNI.SignatureCrypto_sign__SWIG_1(swigCPtr, this, KeyPairInterface.getCPtr(_keyPair), _keyPair, SWIGTYPE_p_HashType.getCPtr(_hash)), true);
}
public boolean verify(SWIGTYPE_p_PublicPtr _pubKey, SWIGTYPE_p_HashType _hash, SWIGTYPE_p_bytesConstRef _signatureData) {
return bcosJNI.SignatureCrypto_verify__SWIG_0(swigCPtr, this, SWIGTYPE_p_PublicPtr.getCPtr(_pubKey), SWIGTYPE_p_HashType.getCPtr(_hash), SWIGTYPE_p_bytesConstRef.getCPtr(_signatureData));
}
public boolean verify(SWIGTYPE_p_std__shared_ptrT_bytes_const_t _pubKeyBytes, SWIGTYPE_p_HashType _hash, SWIGTYPE_p_bytesConstRef _signatureData) {
return bcosJNI.SignatureCrypto_verify__SWIG_1(swigCPtr, this, SWIGTYPE_p_std__shared_ptrT_bytes_const_t.getCPtr(_pubKeyBytes), SWIGTYPE_p_HashType.getCPtr(_hash), SWIGTYPE_p_bytesConstRef.getCPtr(_signatureData));
}
public SWIGTYPE_p_PublicPtr recover(SWIGTYPE_p_HashType _hash, SWIGTYPE_p_bytesConstRef _signatureData) {
return new SWIGTYPE_p_PublicPtr(bcosJNI.SignatureCrypto_recover(swigCPtr, this, SWIGTYPE_p_HashType.getCPtr(_hash), SWIGTYPE_p_bytesConstRef.getCPtr(_signatureData)), true);
}
public SWIGTYPE_p_std__pairT_bool_bytes_t recoverAddress(Hash _hashImpl, SWIGTYPE_p_HashType _hash, SWIGTYPE_p_bytesConstRef _signatureData) {
return new SWIGTYPE_p_std__pairT_bool_bytes_t(bcosJNI.SignatureCrypto_recoverAddress__SWIG_0(swigCPtr, this, Hash.getCPtr(_hashImpl), _hashImpl, SWIGTYPE_p_HashType.getCPtr(_hash), SWIGTYPE_p_bytesConstRef.getCPtr(_signatureData)), true);
}
public SWIGTYPE_p_std__unique_ptrT_bcos__crypto__KeyPairInterface_t generateKeyPair() {
return new SWIGTYPE_p_std__unique_ptrT_bcos__crypto__KeyPairInterface_t(bcosJNI.SignatureCrypto_generateKeyPair(swigCPtr, this), true);
}
public SWIGTYPE_p_std__pairT_bool_bytes_t recoverAddress(SWIGTYPE_p_Hash__Ptr _hashImpl, SWIGTYPE_p_bytesConstRef _in) {
return new SWIGTYPE_p_std__pairT_bool_bytes_t(bcosJNI.SignatureCrypto_recoverAddress__SWIG_1(swigCPtr, this, SWIGTYPE_p_Hash__Ptr.getCPtr(_hashImpl), SWIGTYPE_p_bytesConstRef.getCPtr(_in)), true);
}
public SWIGTYPE_p_std__unique_ptrT_bcos__crypto__KeyPairInterface_t createKeyPair(SWIGTYPE_p_std__shared_ptrT_KeyInterface_t _secretKey) {
return new SWIGTYPE_p_std__unique_ptrT_bcos__crypto__KeyPairInterface_t(bcosJNI.SignatureCrypto_createKeyPair(swigCPtr, this, SWIGTYPE_p_std__shared_ptrT_KeyInterface_t.getCPtr(_secretKey)), true);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy