Here you can find the source of decryptedPassword(String key, String encryptedData)
public static String decryptedPassword(String key, String encryptedData)
//package com.java2s; import java.security.Key; import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; public class Main { private static final String ENCODING = "ISO-8859-1"; public static String decryptedPassword(String key, String encryptedData) { String decryptedUserData = ""; try {/*w ww. j a va 2s . com*/ // Create key and cipher Key aesKey = new SecretKeySpec(key.getBytes(), "AES"); Cipher cipher = Cipher.getInstance("AES"); // decrypt the text cipher.init(Cipher.DECRYPT_MODE, aesKey); byte[] userData = cipher.doFinal(encryptedData .getBytes(ENCODING)); decryptedUserData = new String(userData); } catch (Exception e) { e.printStackTrace(); } return decryptedUserData; } }