hi.. how can i encrypt in java using MD5???
ive tried this:
public static void main(String []args)
{
try{
String tmp = new String("hello"
byte b2[]=tmp.getBytes();
MessageDigest tmp1 = MessageDigest.getInstance("MD5"
System.out.println("hash: " + hash1.asHex());
byte b1[]=tmp1.digest(b2)
}
catch(Exception e)
{
System.out.println(e.toString());
}
}
but no matter the word i want to encrypt i get the same result.
im trying to set up a radius server and thats why i need it.. any ideas???
thank you very much
Eli
ive tried this:
public static void main(String []args)
{
try{
String tmp = new String("hello"
byte b2[]=tmp.getBytes();
MessageDigest tmp1 = MessageDigest.getInstance("MD5"
System.out.println("hash: " + hash1.asHex());
byte b1[]=tmp1.digest(b2)
}
catch(Exception e)
{
System.out.println(e.toString());
}
}
but no matter the word i want to encrypt i get the same result.
im trying to set up a radius server and thats why i need it.. any ideas???
thank you very much
Eli