mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-28 11:08:12 +08:00
update 添加util方法
This commit is contained in:
@@ -115,6 +115,18 @@ public class Cryptos {
|
|||||||
return aes(input, key, Cipher.ENCRYPT_MODE);
|
return aes(input, key, Cipher.ENCRYPT_MODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加密
|
||||||
|
* @param input
|
||||||
|
* @param key
|
||||||
|
* @param iv
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String aesEncrypt(String input, String key, String iv) {
|
||||||
|
byte[] aes = aes(input.getBytes(), key.getBytes(), iv.getBytes(), Cipher.ENCRYPT_MODE);
|
||||||
|
return Encodes.encodeBase64(aes);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 使用AES加密原始字符串.
|
* 使用AES加密原始字符串.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user