Package com.wolfssl.wolfcrypt
Class NativeStruct
java.lang.Object
com.wolfssl.wolfcrypt.WolfObject
com.wolfssl.wolfcrypt.NativeStruct
- Direct Known Subclasses:
BlockCipher
,Chacha
,Curve25519
,Dh
,Ecc
,Ed25519
,Hmac
,MessageDigest
,Rng
,Rsa
public abstract class NativeStruct extends WolfObject
Wrapper for the native WolfCrypt structs.
- Version:
- 1.0, February 2015
- Author:
- Moisés Guimarães
-
Field Summary
Fields Modifier and Type Field Description static long
NULL
-
Constructor Summary
Constructors Modifier Constructor Description protected
NativeStruct()
-
Method Summary
Modifier and Type Method Description protected void
finalize()
long
getNativeStruct()
protected abstract long
mallocNativeStruct()
void
releaseNativeStruct()
Releases the host data stored in a NativeStruct.protected void
setNativeStruct(long nativeStruct)
-
Field Details
-
NULL
public static final long NULL- See Also:
- Constant Field Values
-
-
Constructor Details
-
NativeStruct
protected NativeStruct()
-
-
Method Details
-
getNativeStruct
public long getNativeStruct() -
setNativeStruct
protected void setNativeStruct(long nativeStruct) -
releaseNativeStruct
public void releaseNativeStruct()Releases the host data stored in a NativeStruct. This method provides a way to release host data without depending on the garbage collector to get around to releasing it. Derived objects whose native data structures have their own free functions, should be override this method to call that function. -
mallocNativeStruct
protected abstract long mallocNativeStruct() throws java.lang.OutOfMemoryError- Throws:
java.lang.OutOfMemoryError
-
finalize
protected void finalize() throws java.lang.Throwable- Overrides:
finalize
in classjava.lang.Object
- Throws:
java.lang.Throwable
-