diff options
author | Edouard <m@edouard.paris> | 2020-06-05 20:04:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-05 20:04:11 +0200 |
commit | 7eeebe1e5a86a4ad622bc41f88fcb93b619f5a16 (patch) | |
tree | 5d36446c4d39b9893c0a50f0ad22f38083d9bcb6 /tpl/crypto/init.go | |
parent | 740fa4a91d01fa1c0b151bae0c97a13eea61f5f9 (diff) |
tpl/crypto: Add hmac
Diffstat (limited to 'tpl/crypto/init.go')
-rw-r--r-- | tpl/crypto/init.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tpl/crypto/init.go b/tpl/crypto/init.go index db6a5f92c..9a958bd38 100644 --- a/tpl/crypto/init.go +++ b/tpl/crypto/init.go @@ -51,6 +51,13 @@ func init() { }, ) + ns.AddMethodMapping(ctx.HMAC, + []string{"hmac"}, + [][2]string{ + {`{{ hmac "sha256" "Secret key" "Hello world, gophers!" }}`, `b6d11b6c53830b9d87036272ca9fe9d19306b8f9d8aa07b15da27d89e6e34f40`}, + }, + ) + return ns } |