public static String footprint ( String stringToFootprint ) { try { MessageDigest md = MessageDigest . getInstance ( "SHA-1" ) ; return byteArrayToHexString ( md . digest ( stringToFootprint . getBytes ( ) ) ) ; } catch ( NoSuchAlgorithmException nsae ) { LOGGER . warn ( "Unable to calculate the footprint for string [{}]." , stringToFootprint ) ; return null ; } }
Calculate a footprint of a string