// Path: app/src/main/java/com/evgenii/aescrypto/interfaces/JsEncryptorInterface.java
// public interface JsEncryptorInterface {
// 	public void decrypt(String text, String password, JsCallback callback);
// 
// 	public void encrypt(String text, String password, JsCallback callback);
// 
// 	public boolean isEncrypted(String text);
// }
// 
// Path: app/src/main/java/com/evgenii/aescrypto/interfaces/MainActivityInterface.java
// public interface MainActivityInterface {
// 	public boolean hasMessage();
// 
// 	public boolean hasPassword();
// 
// 	public boolean isBusy();
// 
// 	public void setMessage(String message);
// 
// 	public String trimmedMessage();
// 
// 	public String trimmedPassword();
// 
// 	public void updateBusy(boolean isBusy);
// 
// 	public void updateEncryptButtonTitle();
// }


import com.evgenii.aescrypto.interfaces.JsEncryptorInterface;
import com.evgenii.aescrypto.interfaces.MainActivityInterface;
import com.evgenii.jsevaluator.interfaces.JsCallback;
		mActivity.updateBusy(true);
		mJsEncryptor.decrypt(mActivity.trimmedMessage(), mActivity.trimmedPassword(),
				new JsCallback() {
					@Override
					public void onResult(final String decryptedTextFromJs) {
						mActivity.updateBusy(false);

						if (decryptedTextFromJs != null && !decryptedTextFromJs.trim().isEmpty()) {
							mActivity.setMessage(decryptedTextFromJs);
						}
					}

					@Override
					public void onError(String errorMessage) {
						// Process JavaScript error here.
						// This method is called in the UI thread.
					}
				});
	}

	public boolean isDecryptable() {
		if (mActivity.isBusy())
			return false;

		if (!mActivity.hasPassword())
			return false;

		if (!mJsEncryptor.isEncrypted(mActivity.trimmedMessage()))
			return false;

// Path: app/src/main/java/com/evgenii/aescrypto/interfaces/JsEncryptorInterface.java
// public interface JsEncryptorInterface {
// 	public void decrypt(String text, String password, JsCallback callback);
// 
// 	public void encrypt(String text, String password, JsCallback callback);
// 
// 	public boolean isEncrypted(String text);
// }
// 
// Path: app/src/main/java/com/evgenii/aescrypto/interfaces/MainActivityInterface.java
// public interface MainActivityInterface {
// 	public boolean hasMessage();
// 
// 	public boolean hasPassword();
// 
// 	public boolean isBusy();
// 
// 	public void setMessage(String message);
// 
// 	public String trimmedMessage();
// 
// 	public String trimmedPassword();
// 
// 	public void updateBusy(boolean isBusy);
// 
// 	public void updateEncryptButtonTitle();
// }


// Path: app/src/main/java/com/evgenii/aescrypto/Decrypt.java
import com.evgenii.aescrypto.interfaces.JsEncryptorInterface;
import com.evgenii.aescrypto.interfaces.MainActivityInterface;
import com.evgenii.jsevaluator.interfaces.JsCallback;

		mActivity.updateBusy(true);
		mJsEncryptor.decrypt(mActivity.trimmedMessage(), mActivity.trimmedPassword(),
				new JsCallback() {
					@Override
					public void onResult(final String decryptedTextFromJs) {
						mActivity.updateBusy(false);

						if (decryptedTextFromJs != null && !decryptedTextFromJs.trim().isEmpty()) {
							mActivity.setMessage(decryptedTextFromJs);
						}
					}

					@Override
					public void onError(String errorMessage) {
						// Process JavaScript error here.
						// This method is called in the UI thread.
					}
				});
	}

	public boolean isDecryptable() {
		if (mActivity.isBusy())
			return false;

		if (!mActivity.hasPassword())
			return false;

		if (!mJsEncryptor.isEncrypted(mActivity.trimmedMessage()))
			return false;

		return true;