YehdBPev通过AES解密为123456

1、代码

import cn.hutool.crypto.Mode;
import cn.hutool.crypto.Padding;
import cn.hutool.crypto.symmetric.AES;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;

public class Test {
   public static void main(String [] args) {
      SecretKeySpec secretKeySpec = new SecretKeySpec("thanks,pig4cloud".getBytes(), "AES");
      IvParameterSpec ivParameterSpec = new IvParameterSpec("thanks,pig4cloud".getBytes());
      AES aes = new AES(Mode.CFB, Padding.NoPadding, secretKeySpec, ivParameterSpec);
      String password = aes.decryptStr("YehdBPev");
      System.out.println("password:" + password);
   }
}

2、验证截图

YehdBPev通过AES解密为123456_第1张图片

你可能感兴趣的:(10,运维部署,java)