src/jpm/dg/Crypto.java
/**
	 * Decrypts text.
	 * 
	 * @param pass  User-provided password.
	 * @param cipherText
	 * @return The correct cleartext iff the password is correct.
	 * @throws Exception
	 */
Decrypts text.

@param pass  User-provided password.
@param cipherText
@return The correct cleartext iff the password is correct.
@throws Exception
Decrypts text . @param pass User - provided password . @param cipherText @return The correct cleartext iff the password is correct . @throws Exception
public static String decrypt(String pass, String cipherText)
			throws Exception {
		byte[] rawKey = getRawKey(pass.getBytes("ISO-8859-1"));
		byte[] encrypted = toByte(cipherText);
		Cipher cipher = Cipher.getInstance("AES");
		cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(rawKey, "AES"));
		return new String(cipher.doFinal(encrypted));
	}
public static String decrypt ( String pass , String cipherText ) throws Exception { byte [ ] rawKey = getRawKey ( pass . getBytes ( "ISO-8859-1" ) ) ; byte [ ] encrypted = toByte ( cipherText ) ; Cipher cipher = Cipher . getInstance ( "AES" ) ; cipher . init ( Cipher . DECRYPT_MODE , new SecretKeySpec ( rawKey , "AES" ) ) ; return new String ( cipher . doFinal ( encrypted ) ) ; }
Decrypts text.
Decrypts text .