fix static method
This commit is contained in:
@@ -22,7 +22,7 @@ public class Decryptor {
|
||||
* @param key 密钥
|
||||
* @return 解密结果
|
||||
*/
|
||||
public byte[] aes(String data, byte[] key) {
|
||||
public static byte[] aes(String data, byte[] key) {
|
||||
return aes(data.getBytes(), key);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ public class Decryptor {
|
||||
* @param key 密钥
|
||||
* @return 解密结果
|
||||
*/
|
||||
public byte[] aes(byte[] data, byte[] key) {
|
||||
public static byte[] aes(byte[] data, byte[] key) {
|
||||
try {
|
||||
SecretKey secretKey = new SecretKeySpec(key, "AES");
|
||||
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
||||
|
||||
Reference in New Issue
Block a user