Download and add the aes.js in the script folder (The aes.js are shared in Github source code link) As we are consider the ASP .NET MVC template then there is already have the HomeController.cs and in Index() we need to add our Login page html code. First, we'll encrypt the content using a newly generated secret key (we're using AES, Advanced Encryption Standard, as the symmetric encryption algorithm in this example). 1. AES Encryption and Decryption MUSIC. Parameters: encryptionKey - Encryption key. 的密文。在这种情况下CryptoJS不能Java进行解密时不可能的。 length)); // - element 1: make sure that we know the size of the wrapped key ciphertextBuffer. Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding", "SunJCE"); SecretKeySpec key = new SecretKeySpec(encryptionKey.getBytes("UTF-8"), "AES"); cipher.init(Cipher.DECRYPT_MODE, key,new IvParameterSpec(IV.getBytes("UTF-8"))); byte[] buff = cipher.doFinal(cipherText); byte[] res = new byte[buff.length +1]; for(byte i=0; i