Hi,
I'm new to java and I'm trying to implement java.security.MessageDigest in my app so I can store user passwords, but I keep getting the following compile error
test_app.java:9: unreported exception java.security.NoSuchAlgorithmException; must be caught or declared to be thrown
MessageDigest md = MessageDigest.getInstance("SHA-1");
I have javac 1.6.0_05 installed on my MS Windows XP SP2 laptop along with netbeans 6.0.1
I have imported the java.security.MessageDigest class at the start of my class file but can't seem to get past the first hurdle, what am I doing wrong?
According to all the documentation I have read so far JCA and JCE are installed as part of the JDK and they should provide me with all the providers needed to implement the SHA-1 or MD5 Algorithms.
Also is there a BASE64 encoding class in the java library?
Any assistance in this would be very grateful,
Martin.