Hello All,
I wrote a java service which encrypts based on the tripleDES algorithm.
I imported the following in the shared tab
javax.crypto.Cipher;
javax.crypto.BadPaddingException;
javax.crypto.IllegalBlockSizeException;
javax.crypto.KeyGenerator;
java.security.Key;
java.security.InvalidKeyException;
I included the following property in the extended field
watt.server.compile=javac -O -classpath {0} -d {1} {2}
when i try to compile the java service i am getting the following error
Java Service Error
D:\wm61\IntegrationServer\packages\Test\code\source\Test.java:63: unreported exception java.security.NoSuchAlgorithmException; must be caught or declared to be thrown
key = KeyGenerator.getInstance(algorithm).generateKey();
^
D:\wm61\IntegrationServer\packages\Test\code\source\Test.java:64: unreported exception java.security.NoSuchAlgorithmException; must be caught or declared to be thrown
cipher = Cipher.getInstance(algorithm);
^
D:\wm61\IntegrationServer\packages\Test\code\source\Test.java:67: unreported exception java.security.InvalidKeyException; must be caught or declared to be thrown
cipher.init(Cipher.ENCRYPT_MODE, key);
^
D:\wm61\IntegrationServer\packages\Test\code\source\Test.java:69: unreported exception javax.crypto.IllegalBlockSizeException; must be caught or declared to be thrown
byte recoveredBytes = cipher.doFinal(inputBytes);
^
Note: D:\wm61\IntegrationServer\packages\Test\code\source\Test.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
4 errors
could someone please help how to compile this code sucessfully.
Please find attached the java service code
Thanks in Advance
yarkar
EncryptionCode.txt (707 Bytes)