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 intBLOCK_SIZEstatic intDECRYPT_MODEstatic intENCRYPT_MODEstatic intKEY_SIZE_128static intKEY_SIZE_192static intKEY_SIZE_256 -
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected longmallocNativeStruct()protected voidnative_set_key(byte[] key, byte[] iv, int opmode)protected intnative_update(int opmode, byte[] input, int offset, int length, byte[] output, int outputOffset)protected intnative_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, willUseKeyMethods 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:
mallocNativeStructin classNativeStruct- Throws:
java.lang.OutOfMemoryError
-
native_set_key
protected void native_set_key(byte[] key, byte[] iv, int opmode)- Specified by:
native_set_keyin classBlockCipher
-
native_update
protected int native_update(int opmode, byte[] input, int offset, int length, byte[] output, int outputOffset)- Specified by:
native_updatein 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_updatein classBlockCipher
-