code: public static String fingerprint(String str) {
  		try {
  			MessageDigest md = MessageDigest.getInstance("SHA-1");
  			return byteArrayToHexString(md.digest(str.getBytes()));
  		}
  		catch (NoSuchAlgorithmException nsae) {
  			LOGGER.warning("Unable to calculate the fingerprint for string [" + str + "].");
  			return null;
  		}
  	}
docs: Generate a fingerprint for a given string
  
  @param str The string to fingerprint
  @return The fingerprint generated