s.fisco-bcos-tars-sdk.3.5.0.source-code.AESCrypto 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 AESCrypto extends SymmetricEncryption {
private transient long swigCPtr;
protected AESCrypto(long cPtr, boolean cMemoryOwn) {
super(bcosJNI.AESCrypto_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(AESCrypto obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected static long swigRelease(AESCrypto obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}
@SuppressWarnings("deprecation")
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
bcosJNI.delete_AESCrypto(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public AESCrypto() {
this(bcosJNI.new_AESCrypto(), true);
}
public SWIGTYPE_p_bytesPointer symmetricEncrypt(SWIGTYPE_p_unsigned_char _plainData, long _plainDataSize, SWIGTYPE_p_unsigned_char _key, long _keySize) {
return new SWIGTYPE_p_bytesPointer(bcosJNI.AESCrypto_symmetricEncrypt__SWIG_0(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(_plainData), _plainDataSize, SWIGTYPE_p_unsigned_char.getCPtr(_key), _keySize), true);
}
public SWIGTYPE_p_bytesPointer symmetricDecrypt(SWIGTYPE_p_unsigned_char _cipherData, long _cipherDataSize, SWIGTYPE_p_unsigned_char _key, long _keySize) {
return new SWIGTYPE_p_bytesPointer(bcosJNI.AESCrypto_symmetricDecrypt__SWIG_0(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(_cipherData), _cipherDataSize, SWIGTYPE_p_unsigned_char.getCPtr(_key), _keySize), true);
}
public SWIGTYPE_p_bytesPointer symmetricEncrypt(SWIGTYPE_p_unsigned_char _plainData, long _plainDataSize, SWIGTYPE_p_unsigned_char _key, long _keySize, SWIGTYPE_p_unsigned_char _ivData, long _ivDataSize) {
return new SWIGTYPE_p_bytesPointer(bcosJNI.AESCrypto_symmetricEncrypt__SWIG_1(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(_plainData), _plainDataSize, SWIGTYPE_p_unsigned_char.getCPtr(_key), _keySize, SWIGTYPE_p_unsigned_char.getCPtr(_ivData), _ivDataSize), true);
}
public SWIGTYPE_p_bytesPointer symmetricDecrypt(SWIGTYPE_p_unsigned_char _cipherData, long _cipherDataSize, SWIGTYPE_p_unsigned_char _key, long _keySize, SWIGTYPE_p_unsigned_char _ivData, long _ivDataSize) {
return new SWIGTYPE_p_bytesPointer(bcosJNI.AESCrypto_symmetricDecrypt__SWIG_1(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(_cipherData), _cipherDataSize, SWIGTYPE_p_unsigned_char.getCPtr(_key), _keySize, SWIGTYPE_p_unsigned_char.getCPtr(_ivData), _ivDataSize), true);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy