Problems with: SunJCE
Posted on 2003-03-02
I have a java application, from which I launch a web application. While doing it I encode the name & password in the following way:
Provider sunJce = new SunJCE();
byte passwordInBytes = password.getBytes("UTF-8");
skspec = new SecretKeySpec(passwordInBytes, "Blowfish");
cipher = javax.crypto.Cipher.getInstance("Blowfish/ECB/PKCS5Padding");
And I decode it in a servlet on the web-side.
It works fine from the java application (it launches the URL & the encrypted parameters), but when trying to decode it on the web application I get the following exception:
(I fail when trying to do: CipherEncryption cipher = new CipherEncryption(key);)
I tried to copy the sunjce_provider.jar from the jsdk to the lib directories of the tomcat & my web applicatoin, but then I get "method not found" exeptions.
Do you have any idea what could be the problem?