class StringUtils {

	public static String sha1Hash(String s) {
		if (s == null) {
			return null;
		}
		final MessageDigest messageDigest;
		try {
			messageDigest = MessageDigest.getInstance("SHA-1");
		} catch (NoSuchAlgorithmException e) {
			throw new IllegalStateException(e);
		}
		final byte[] digest = messageDigest.digest(s.getBytes(Charset.forName("UTF-8")));
		return bytesToHex(digest);
	}

	private  StringUtils();

}