java Encrypted ciphertext: iP6nVfCE9Eiw47utJDR6wV6Lhl4xyOgYykub0HUJSZQ=The following is the aes encryption class of java, I hope it can be decrypted with php
package com.mk.api.util;import java.security.Key;import java .security.MessageDigest;import java.util.Arrays;import javax.crypto.Cipher;import javax.crypto.spec.SecretKeySpec;import javax.xml.bind.DatatypeConverter;/***AES encryption*/public class AES { private static final String AESTYPE = "AES"; private static final String KEY = "Z8LSq0wWwB5v 6YJzurcP463H3F12iZh74fDj4S74oUH4EONkiKb2FmiWUbtFh97GG/c/lbDE47mvw6j94yXxKHOpoqu6zpLKMKPcOoSppcVWb2q34qENB JkudXUh4MWcreondLmLL2UyydtFKuU9Sa5VgY/CzGaVGJABK2ZR94="; /*** Encryption * @param content * @return*/ public static String encrypt(String str) { try { Key key = generateKey (); return encryptedValue; } catch (Exception e) { e.printStackTrace(); return null; /*** Decryption * @param content * @return*/ public static String decrypt(String str) { try { Key key = generateKey(); Cipher c = Cipher.getInstance(AESTYPE); (decValue) ; return decryptedValue; } catch (Exception e) { e.printStackTrace(); return null; MessageDigest.getInstance("SHA-1"); keyValue = sha.digest(keyValue); keyValue = Arrays.copyOf(keyValue, 16); Key key = new SecretKeySpec(keyValue, AESTYPE); return key; } }
Look at this: https://www.php.cn/php-weizijiaocheng-455991.html
The format of the above code is messed up