Package org.teamapps.cluster.crypto
Class AesCipher
java.lang.Object
org.teamapps.cluster.crypto.AesCipher
public class AesCipher
extends java.lang.Object
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description static byte[]combineArrays(byte[] array1, byte[] array2)byte[]decrypt(byte[] data)byte[]decrypt(byte[] data, int offset)byte[]decrypt(long nonce, long id, byte[] data)intdecryptInt(long nonce, long id, int value)byte[]decryptSave(byte[] data)byte[]encrypt(byte[] data)byte[]encrypt(long nonce, long id, byte[] data)intencryptInt(long nonce, long id, int value)byte[]encryptSave(byte[] data)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
AesCipher
public AesCipher(java.lang.String key) -
AesCipher
public AesCipher(byte[] key)
-
-
Method Details
-
encrypt
public byte[] encrypt(byte[] data) throws java.lang.Exception- Throws:
java.lang.Exception
-
encryptSave
public byte[] encryptSave(byte[] data) -
decrypt
public byte[] decrypt(byte[] data) throws java.lang.Exception- Throws:
java.lang.Exception
-
decryptSave
public byte[] decryptSave(byte[] data) -
decrypt
public byte[] decrypt(byte[] data, int offset) throws java.lang.Exception- Throws:
java.lang.Exception
-
encrypt
public byte[] encrypt(long nonce, long id, byte[] data) throws java.lang.Exception- Throws:
java.lang.Exception
-
decrypt
public byte[] decrypt(long nonce, long id, byte[] data) throws java.lang.Exception- Throws:
java.lang.Exception
-
encryptInt
public int encryptInt(long nonce, long id, int value) throws java.lang.Exception- Throws:
java.lang.Exception
-
decryptInt
public int decryptInt(long nonce, long id, int value) throws java.lang.Exception- Throws:
java.lang.Exception
-
combineArrays
public static byte[] combineArrays(byte[] array1, byte[] array2)
-