public static String hexMD5 ( String value ) { try { MessageDigest messageDigest = MessageDigest . getInstance ( "MD5" ) ; messageDigest . reset ( ) ; messageDigest . update ( value . getBytes ( "utf-8" ) ) ; byte [ ] digest = messageDigest . digest ( ) ; return byteToHexString ( digest ) ; } catch ( Exception ex ) { throw new UnexpectedException ( ex ) ; } }
Build an hexadecimal MD5 hash for a String