Java Encryption with DES and Password

anthony0007
anthony0007 used Ask the Experts™
on
I have a file that has been encrypted. Currently, my company uses the following command in UNIX to decrypt it. I have been asked to write a java program that does this. I have tried a bunch of different techniques but it doesn't seam to work.  

Here is the command I am trying to replace:
/usr/timesq/tsq/des-solaris -D -u -k "mypassword" encrypted_filename plain_filename

Any ideas?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016

Commented:
What is the problem?

Author

Commented:
Scratch the bit about the des-solaris program.

I have a file that is encyrpted by a client of ours. They have given us a key to unencrypt it. They said they used DES and a password ("boobear"). What is the java code I should write to unencrypt the file?
Java Developer
Top Expert 2010
Commented:
If you have the command required then use Runtime.exec()

http://www.exampledepot.com/egs/java.lang/Exec.html

To decrypot DES see the example code here:

http://www.exampledepot.com/egs/javax.crypto/DesFile.html

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial