public class SecurityUtils extends Object
| Constructor and Description |
|---|
SecurityUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
base64dec(String s) |
static String |
base64enc(String s) |
static byte[] |
decrypt(byte[] input,
byte[] key) |
static byte[] |
decrypt(byte[] input,
byte[] key,
String algorithm,
String cipherAlgorithm,
AlgorithmParameterSpec paramSpec) |
static byte[] |
encrypt(byte[] input,
byte[] key) |
static byte[] |
encrypt(byte[] input,
byte[] key,
String algorithm,
String cipherAlgorithm,
AlgorithmParameterSpec paramSpec) |
static SecretKey |
generateKey(int size) |
static SecretKey |
generateKey(int size,
String algorithm) |
static void |
main(String[] args) |
static String |
md5(String s) |
static String |
sha1(String s) |
static String |
sha256(String s) |
public static byte[] decrypt(byte[] input,
byte[] key,
String algorithm,
String cipherAlgorithm,
AlgorithmParameterSpec paramSpec)
throws Exception
Exceptionpublic static byte[] encrypt(byte[] input,
byte[] key,
String algorithm,
String cipherAlgorithm,
AlgorithmParameterSpec paramSpec)
throws Exception
Exceptionpublic static SecretKey generateKey(int size, String algorithm) throws Exception
ExceptionCopyright © 2015. All rights reserved.