Thanks a lot for the answer Ulf.
I am still having a problem for the key. I've replaced this
by
and I've got
at com.sun.crypto.provider.SunJCE_c.a(DashoA13*..)
at com.sun.crypto.provider.SunJCE_g.a(DashoA13*..)
at com.sun.crypto.provider.SunJCE_f.a(DashoA13*..)
at com.sun.crypto.provider.SunJCE_f.a(DashoA13*..)
at com.sun.crypto.provider.AESCipher.engineInit(DashoA13*..)
at javax.crypto.Cipher.a(DashoA13*..)
at javax.crypto.Cipher.a(DashoA13*..)
at javax.crypto.Cipher.init(DashoA13*..)
at javax.crypto.Cipher.init(DashoA13*..)
at AES.main(AES.java:47)
That's why I am confused, I've tried using a key of the same size, like "MAN" but I am still getting the same problem. By the way, is this program ready doing the AES encryption, I am having doubt on it as if it is doing something very simple. I am new to the built in crypto package in Java, that's why I am asking stupid questions.
Many thanks in advance.