Java String to SHA1

UPDATEYou can use Apache Commons Codec (version 1.7+) to do this job for you. DigestUtils.sha1Hex(stringToConvertToSHexRepresentation) Thanks to @Jon Onstott for this suggestion. Old AnswerConvert your Byte Array to Hex String. Real’s How To tells you how. and (copied from Real’s How To) BTW, you may get more compact representation using Base64. Apache Commons Codec API 1.4, has this nice utility … Read more

Is it possible to decrypt SHA1

SHA1 is a cryptographic hash function, so the intention of the design was to avoid what you are trying to do. However, breaking a SHA1 hash is technically possible. You can do so by just trying to guess what was hashed. This brute-force approach is of course not efficient, but that’s pretty much the only way. So to … Read more