Package com.wolfssl.wolfcrypt
Class Aes
java.lang.Object
com.wolfssl.wolfcrypt.WolfObject
com.wolfssl.wolfcrypt.NativeStruct
com.wolfssl.wolfcrypt.BlockCipher
com.wolfssl.wolfcrypt.Aes
public class Aes extends BlockCipher
Wrapper for the native WolfCrypt Aes implementation.
- Version:
- 2.0, March 2017
- Author:
- Moisés Guimarães
-
Field Summary
Fields Modifier and Type Field Description static int
BLOCK_SIZE
static int
DECRYPT_MODE
static int
ENCRYPT_MODE
static int
KEY_SIZE_128
static int
KEY_SIZE_192
static int
KEY_SIZE_256
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected long
mallocNativeStruct()
protected void
native_set_key(byte[] key, byte[] iv, int opmode)
protected int
native_update(int opmode, byte[] input, int offset, int length, byte[] output, int outputOffset)
protected int
native_update(int opmode, java.nio.ByteBuffer input, int offset, int length, java.nio.ByteBuffer output, int outputOffset)
Methods inherited from class com.wolfssl.wolfcrypt.BlockCipher
releaseNativeStruct, setKey, update, update, update, update, willUseKey
Methods inherited from class com.wolfssl.wolfcrypt.NativeStruct
finalize, getNativeStruct, setNativeStruct
-
Field Details
-
KEY_SIZE_128
public static final int KEY_SIZE_128- See Also:
- Constant Field Values
-
KEY_SIZE_192
public static final int KEY_SIZE_192- See Also:
- Constant Field Values
-
KEY_SIZE_256
public static final int KEY_SIZE_256- See Also:
- Constant Field Values
-
BLOCK_SIZE
public static final int BLOCK_SIZE- See Also:
- Constant Field Values
-
ENCRYPT_MODE
public static final int ENCRYPT_MODE- See Also:
- Constant Field Values
-
DECRYPT_MODE
public static final int DECRYPT_MODE- See Also:
- Constant Field Values
-
-
Constructor Details
-
Method Details
-
mallocNativeStruct
protected long mallocNativeStruct() throws java.lang.OutOfMemoryError- Specified by:
mallocNativeStruct
in classNativeStruct
- Throws:
java.lang.OutOfMemoryError
-
native_set_key
protected void native_set_key(byte[] key, byte[] iv, int opmode)- Specified by:
native_set_key
in classBlockCipher
-
native_update
protected int native_update(int opmode, byte[] input, int offset, int length, byte[] output, int outputOffset)- Specified by:
native_update
in classBlockCipher
-
native_update
protected int native_update(int opmode, java.nio.ByteBuffer input, int offset, int length, java.nio.ByteBuffer output, int outputOffset)- Specified by:
native_update
in classBlockCipher
-