---
title: hash.hmac() function
description: hash.hmac() converts a string value to an MD5-signed SHA-1 hash.
url: https://docs.influxdata.com/flux/v0/stdlib/contrib/qxip/hash/hmac/
estimated_tokens: 547
product: Flux
version: v0
---

# hash.hmac() function

-   Flux 0.193.0+
-   View InfluxDB support

`hash.hmac()` is a user-contributed function maintained by the [package author](#package-author-and-maintainer).

`hash.hmac()` converts a string value to an MD5-signed SHA-1 hash.

##### Function type signature

```js
(k: A, v: A) => string
```

For more information, see [Function type signatures](/flux/v0/function-type-signatures/).

## Parameters

### v

(Required) String to hash.

### k

(Required) Key to sign hash.

## Examples

### Convert a string and key to a base64-signed hash

```js
import "contrib/qxip/hash"

hash.hmac(v: "helloworld", k: "123456")// Returns 75B5ueLnnGepYvh+KoevTzXCrjc=

```
