@SneakyThrows(IOException.class)
	public static String sha1(String input) throws NoSuchAlgorithmException {
		MessageDigest mDigest = MessageDigest.getInstance("SHA1");
		byte[] result = mDigest.digest(input.getBytes("UTF-8"));
		String resultString = String.format("%040x", new BigInteger(1, result));
		return resultString;
	}
@ SneakyThrows ( IOException . class ) public static String sha1 ( String input ) throws NoSuchAlgorithmException { MessageDigest mDigest = MessageDigest . getInstance ( "SHA1" ) ; byte [ ] result = mDigest . digest ( input . getBytes ( "UTF-8" ) ) ; String resultString = String . format ( "%040x" , new BigInteger ( 1 , result ) ) ; return resultString ; }
Calculates the SHA1 Digest of a given input.

@param input the input
@return the string
@throws NoSuchAlgorithmException the no such algorithm exception