hutool md5 aes 加密解密


// AES 加密解密
AES aes = new AES(Mode.CBC, Padding.ZeroPadding, "xxx".getBytes(), "xxx".getBytes());

// 加密并进行Base转码
String encrypt = aes.encryptBase64(content);

// 解密为字符串
String decrypt = aes.decryptStr(encrypt);
System.out.println(decrypt);


//md5加密
Date now = new Date();
String dateTime = DateUtil.format(now, "yyyyMMddHHmmss");
String salt = SecureUtil.md5(dateTime+"xxx");

posted @ 2023-07-10 18:25  全琪俊  阅读(1274)  评论(0编辑  收藏  举报