---
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: 166
product: Flux
version: v0
publisher: InfluxData
canonical: https://docs.influxdata.com/flux/v0/stdlib/contrib/qxip/hash/hmac/
date: '2024-04-08T16:01:02-06:00'
lastmod: '2024-04-08T16:01:02-06:00'
---

* Flux 0.193.0+

InfluxDB support

> [!Important]
> `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

```
import "contrib/qxip/hash"

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

```
