public final class AesUtil extends Object
加密: 随机产生长度为 16 的byte数组作为随机因子, AES加密后,把随机因子和密文合并后转为Base64字符串 解密: 把base64的密文转byte数组后拆分为随机因子和密文,然后进行ASE解密
作者:public static String encrypt(String content, String key) throws Exception
content - 原文key - 密码Exception - expublic static String decrypt(String ciphertext, String key) throws Exception
ciphertext - base64 密文key - 密码Exception - exCopyright © 2022. All rights reserved.