Hi all:
I have two apps. I would like to encrypt URL parameter. So I try to
do.....
First App(FROM: port 9000):
----------------------------------
public class Application extends Controller {
public static void shoppingCenter() throws Exception {
String text = "Hi I am Kevin. I like
play........baseball!";
String plus = Crypto.encryptAES(text);
// encrypt URL
redirect("
http://localhost:9999/index?code="+plus);
}
}
Second App(TO: port 9999):
----------------------------------
public class Application extends Controller {
public static void index() {
String code = params.get("code");
String text = Crypto.decryptAES(code);
render(text);
}
}
It display error:
"An unexpected error occured caused by exception BadPaddingException
Given final block not properly padded"
How to solve it??