@Deprecated public class AesUtil extends Object
| 构造器和说明 |
|---|
AesUtil()
已过时。
|
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
decrypt(String encryptedText,
String password)
已过时。
解密
|
static String |
encrypt(String plainText,
String password)
已过时。
加密
|
private static String |
parseByte2HexStr(byte[] buf)
已过时。
二进制字节数组转16进制字符串
|
private static byte[] |
parseHexStr2Byte(String hexStr)
已过时。
16进制字符串转二进制字节数组
|
public static String encrypt(String plainText, String password) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, UnsupportedEncodingException, IllegalBlockSizeException, BadPaddingException
plainText - 明文password - 密码InvalidKeyExceptionNoSuchAlgorithmExceptionNoSuchPaddingExceptionUnsupportedEncodingExceptionIllegalBlockSizeExceptionBadPaddingExceptionpublic static String decrypt(String encryptedText, String password) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, NumberFormatException
encryptedText - password - InvalidKeyExceptionNoSuchAlgorithmExceptionNoSuchPaddingExceptionIllegalBlockSizeExceptionBadPaddingExceptionNumberFormatExceptionprivate static String parseByte2HexStr(byte[] buf)
buf - private static byte[] parseHexStr2Byte(String hexStr)
hexStr - Copyright © 2024. All rights reserved.