public class MATEncryption extends Object
Constructor and Description |
---|
MATEncryption(String SecretKey,
String iv) |
public byte[] encrypt(String text) throws Exception
text
- String to encryptException
public byte[] decrypt(String code) throws Exception
code
- Encrypted string to decryptException
public static String bytesToHex(byte[] data)
data
- Byte array to convert to hexpublic static byte[] hexToBytes(String str)
str
- Hex string to convert to bytespublic static String sha1(String s)
s
- String to SHA-1 hash