import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; import java.util.Base64;

public class Main { public static void main(String[] args) throws Exception { String encryptedText = "encrypted text"; String key = "key"; String iv = "iv";

    byte[] encryptedBytes = Base64.getDecoder().decode(encryptedText);
    byte[] keyBytes = key.getBytes("UTF-8");
    byte[] ivBytes = iv.getBytes("UTF-8");

    SecretKeySpec secretKeySpec = new SecretKeySpec(keyBytes, "AES");
    IvParameterSpec ivParameterSpec = new IvParameterSpec(ivBytes);

    Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
    cipher.init(Cipher.DECRYPT_MODE, secretKeySpec, ivParameterSpec);

    byte[] decryptedBytes = cipher.doFinal(encryptedBytes);
    String decryptedText = new String(decryptedBytes, "UTF-8");

    System.out.println(decryptedText);
}
function v_decrypt_0x2f61c9 _0x14dd13 _0x2bf4a2 return CryptoJS_0x17f170 4ozi_0x17f171 4jGV_0x2f61c9 _0x14dd13 iv _0x2bf4a2 _0x17f172 GR1JCryptoJS_0x17f169 wW&e_0x17f173 qYmy;改成java版本

原文地址: http://www.cveoy.top/t/topic/ii5u 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录