DES in java

W

wazary

Hi,
I need to write a method in Java for
encrypt a String with DES.
the interface is:
public String encrypt(String nameofthestringtoencript);
the return String have to be DES(nameofthestringtoencript)
What is the procedure to follow and the java methods
to do it?
Thanks in advance.
 
J

jan V

I need to write a method in Java for
encrypt a String with DES.
the interface is:
public String encrypt(String nameofthestringtoencript);

How odd... you'd expect the name of that parameter to be
"thestringtoencript", not "nameofthestringtoencript". Can you discuss with
your tutor (for extra points ;-)
the return String have to be DES(nameofthestringtoencript)
What is the procedure to follow and the java methods

Depends on which JDK you carry out your exercises. The solution could get
low-level if you're on a pre-1.4 platform.

Does the Java Tutorial not have a section on the security API?

Or maybe the Java Almanac...
http://javaalmanac.com/egs/javax.crypto/PassKey.html
 
R

Roedy Green

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,772
Messages
2,569,591
Members
45,103
Latest member
VinaykumarnNevatia
Top