List of usage examples for com.google.common.hash Hashing hmacSha1
public static HashFunction hmacSha1(byte[] key)
From source file:com.facebook.presto.operator.scalar.HmacFunctions.java
@Description("Compute HMAC with SHA1") @ScalarFunction/* ww w . j av a 2 s . com*/ @SqlType(StandardTypes.VARBINARY) public static Slice hmacSha1(@SqlType(StandardTypes.VARBINARY) Slice slice, @SqlType(StandardTypes.VARBINARY) Slice key) { return wrappedBuffer(Hashing.hmacSha1(key.getBytes()).hashBytes(slice.getBytes()).asBytes()); }