From 7eeebe1e5a86a4ad622bc41f88fcb93b619f5a16 Mon Sep 17 00:00:00 2001 From: Edouard Date: Fri, 5 Jun 2020 20:04:11 +0200 Subject: [PATCH] tpl/crypto: Add hmac --- docs/content/en/functions/hmac.md | 34 ++++++++++++++++++++++++ docs/data/docs.json | 17 ++++++++++++ tpl/crypto/crypto.go | 44 +++++++++++++++++++++++++++++++ tpl/crypto/crypto_test.go | 31 ++++++++++++++++++++++ tpl/crypto/init.go | 7 +++++ 5 files changed, 133 insertions(+) create mode 100644 docs/content/en/functions/hmac.md diff --git a/docs/content/en/functions/hmac.md b/docs/content/en/functions/hmac.md new file mode 100644 index 000000000..02343196b --- /dev/null +++ b/docs/content/en/functions/hmac.md @@ -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!"}}, +