s.fisco-bcos-tars-sdk.3.5.0.source-code.CryptoSuite 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 CryptoSuite {
private transient long swigCPtr;
private transient boolean swigCMemOwn;
protected CryptoSuite(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(CryptoSuite 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_CryptoSuite(swigCPtr);
}
swigCPtr = 0;
}
}
public CryptoSuite(SWIGTYPE_p_std__shared_ptrT_Hash_t _hashImpl, SignatureCrypto _signatureImpl, SWIGTYPE_p_std__shared_ptrT_SymmetricEncryption_t _symmetricEncryptionHandler) {
this(bcosJNI.new_CryptoSuite(SWIGTYPE_p_std__shared_ptrT_Hash_t.getCPtr(_hashImpl), SignatureCrypto.getCPtr(_signatureImpl), _signatureImpl, SWIGTYPE_p_std__shared_ptrT_SymmetricEncryption_t.getCPtr(_symmetricEncryptionHandler)), true);
}
public SWIGTYPE_p_Hash__Ptr hashImpl() {
return new SWIGTYPE_p_Hash__Ptr(bcosJNI.CryptoSuite_hashImpl(swigCPtr, this), true);
}
public SignatureCrypto signatureImpl() {
long cPtr = bcosJNI.CryptoSuite_signatureImpl(swigCPtr, this);
return (cPtr == 0) ? null : new SignatureCrypto(cPtr, true);
}
public SWIGTYPE_p_std__shared_ptrT_SymmetricEncryption_t symmetricEncryptionHandler() {
return new SWIGTYPE_p_std__shared_ptrT_SymmetricEncryption_t(bcosJNI.CryptoSuite_symmetricEncryptionHandler(swigCPtr, this), true);
}
public SWIGTYPE_p_Address calculateAddress(SWIGTYPE_p_PublicPtr _public) {
return new SWIGTYPE_p_Address(bcosJNI.CryptoSuite_calculateAddress(swigCPtr, this, SWIGTYPE_p_PublicPtr.getCPtr(_public)), true);
}
public void setKeyFactory(KeyFactory _keyFactory) {
bcosJNI.CryptoSuite_setKeyFactory(swigCPtr, this, KeyFactory.getCPtr(_keyFactory), _keyFactory);
}
public KeyFactory keyFactory() {
long cPtr = bcosJNI.CryptoSuite_keyFactory(swigCPtr, this);
return (cPtr == 0) ? null : new KeyFactory(cPtr, true);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy