Can you suggest me about how to encrypt string using SHA1 algorithm ? I\'ve searched about it. But no luck.
Thanks in advance.
binnyb set me on the right track, but I found some more, easier to understand code here: http://www.coderanch.com/t/526487/java/java/Java-Byte-Hex-String
private static String convertToHex(byte[] data) {
StringBuilder sb = new StringBuilder(data.length * 2);
Formatter fmt = new Formatter(sb);
for (byte b : data) {
fmt.format("%02x", b);
}
return sb.toString();
}