public class OAEncryption extends Object
| Constructor and Description |
|---|
OAEncryption() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decrypt(byte[] bs)
Decrypt bytes into a new byte array.
|
static byte[] |
decrypt(byte[] bs,
String password) |
static String |
decrypt(String inputBase64)
Decrypt a base64 string to a string.
|
static String |
decrypt(String inputBase64,
String password) |
static byte[] |
encrypt(byte[] bs)
Encrypt bytes into a new byte array.
|
static byte[] |
encrypt(byte[] bs,
String password) |
static String |
encrypt(String input)
Encrypt a string to a Base64 string.
|
static String |
encrypt(String input,
String password) |
static Cipher |
getCipher() |
static String |
getHash(String input) |
static String |
getMD5Hash(String input) |
static SecretKey |
getSecretKey()
DES secret key used for encrypting data.
|
static SecretKey |
getSecretKey(String password) |
static String |
getSHAHash(String input)
Generates a SHA-256 hash code base64 string for a given input.
|
static String |
getUUID() |
static String |
getUUID(String value) |
static void |
main(String[] args) |
public static String getSHAHash(String input)
public static byte[] encrypt(byte[] bs)
throws Exception
Exceptiondecrypt(byte[])public static byte[] decrypt(byte[] bs)
throws Exception
Exceptionencrypt(byte[])public static SecretKey getSecretKey() throws Exception
Exceptionpublic static SecretKey getSecretKey(String password) throws Exception
Exceptionpublic static String encrypt(String input) throws Exception
Exceptionpublic static String encrypt(String input, String password) throws Exception
Exceptionpublic static String decrypt(String inputBase64) throws Exception
Exceptionpublic static String decrypt(String inputBase64, String password) throws Exception
Exceptionpublic static String getUUID()
Copyright © 1999–2025 ViaOA. All rights reserved.