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