mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
tpl/crypto: Add hmac
This commit is contained in:
34
docs/content/en/functions/hmac.md
Normal file
34
docs/content/en/functions/hmac.md
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
title: hmac
|
||||
linktitle: hmac
|
||||
description: Compute the cryptographic checksum of a message.
|
||||
godocref:
|
||||
date: 2020-05-29
|
||||
publishdate: 2020-05-29
|
||||
lastmod: 2020-05-29
|
||||
categories: [functions]
|
||||
menu:
|
||||
docs:
|
||||
parent: "functions"
|
||||
keywords: [hmac,checksum]
|
||||
signature: ["hmac HASH_TYPE KEY MESSAGE"]
|
||||
workson: []
|
||||
hugoversion:
|
||||
relatedfuncs: [hmac]
|
||||
deprecated: false
|
||||
aliases: [hmac]
|
||||
---
|
||||
|
||||
`hmac` returns a cryptographic hash that uses a key to sign a message.
|
||||
|
||||
```
|
||||
{{ hmac "sha256" "Secret key" "Hello world, gophers!"}},
|
||||
<!-- returns the string "b6d11b6c53830b9d87036272ca9fe9d19306b8f9d8aa07b15da27d89e6e34f40"
|
||||
```
|
||||
|
||||
Supported hash functions:
|
||||
|
||||
* md5
|
||||
* sha1
|
||||
* sha256
|
||||
* sha512
|
Reference in New Issue
Block a user