Package com.mku.salmon.transform
Class TinyAesTransformer
java.lang.Object
com.mku.salmon.transform.SalmonAES256CTRTransformer
com.mku.salmon.transform.SalmonNativeTransformer
com.mku.salmon.transform.TinyAesTransformer
- All Implemented Interfaces:
ISalmonCTRTransformer
Salmon AES transformer implemented with TinyAES backend.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The constant to pass to the native code while initializing.Fields inherited from class com.mku.salmon.transform.SalmonAES256CTRTransformer
BLOCK_SIZE, EXPANDED_KEY_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
init
(byte[] key, byte[] nonce) Initialize the native transformer to use the Tiny AES implementation.Methods inherited from class com.mku.salmon.transform.SalmonNativeTransformer
decryptData, encryptData, getNativeProxy, setNativeProxy
Methods inherited from class com.mku.salmon.transform.SalmonAES256CTRTransformer
getBlock, getCounter, getExpandedKey, getKey, getNonce, increaseCounter, resetCounter, setExpandedKey, syncCounter
-
Field Details
-
AES_IMPL_TINY_AES
public static final int AES_IMPL_TINY_AESThe constant to pass to the native code while initializing.- See Also:
-
-
Constructor Details
-
TinyAesTransformer
public TinyAesTransformer()
-
-
Method Details
-
init
public void init(byte[] key, byte[] nonce) Initialize the native transformer to use the Tiny AES implementation.- Specified by:
init
in interfaceISalmonCTRTransformer
- Overrides:
init
in classSalmonAES256CTRTransformer
- Parameters:
key
- The AES key to use.nonce
- The nonce to use.- Throws:
SalmonSecurityException
- Thrown if there is a security exception
-