hugo: github.com/gohugoio/hugo/tpl/crypto Index | Files

package crypto

import "github.com/gohugoio/hugo/tpl/crypto"

Package crypto provides template functions for cryptographic operations.

Index

Package Files

crypto.go init.go

type Namespace Uses

type Namespace struct{}

Namespace provides template functions for the "crypto" namespace.

func New Uses

func New() *Namespace

New returns a new instance of the crypto-namespaced template functions.

func (*Namespace) HMAC Uses

func (ns *Namespace) HMAC(h interface{}, k interface{}, m interface{}) (string, error)

HMAC returns a cryptographic hash that uses a key to sign a message.

func (*Namespace) MD5 Uses

func (ns *Namespace) MD5(in interface{}) (string, error)

MD5 hashes the given input and returns its MD5 checksum.

func (*Namespace) SHA1 Uses

func (ns *Namespace) SHA1(in interface{}) (string, error)

SHA1 hashes the given input and returns its SHA1 checksum.

func (*Namespace) SHA256 Uses

func (ns *Namespace) SHA256(in interface{}) (string, error)

SHA256 hashes the given input and returns its SHA256 checksum.

Package crypto imports 11 packages (graph) and is imported by 44 packages. Updated 2020-06-06. Refresh now. Tools for package owners.