public class Encryption extends Object
| Constructor and Description |
|---|
Encryption(String SecretKey,
String iv) |
public byte[] encrypt(String text) throws Exception
text - String to encryptExceptionpublic byte[] decrypt(String code) throws Exception
code - Encrypted string to decryptExceptionpublic 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