crumb

package
v0.0.0-...-85aba21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2018 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareHashes

func CompareHashes(this_enc string, that_enc string) (bool, error)

func CrumbBase

func CrumbBase(cfg CrumbConfig, req *http.Request, extra ...string) (string, error)

func CrumbKey

func CrumbKey(cfg CrumbConfig, req *http.Request) string

func DecryptCrumb

func DecryptCrumb(cfg CrumbConfig, enc_crumb string) (string, error)

func EncryptCrumb

func EncryptCrumb(cfg CrumbConfig, text string) (string, error)

func GenerateCrumb

func GenerateCrumb(cfg CrumbConfig, req *http.Request, extra ...string) (string, error)

func HashCrumb

func HashCrumb(cfg CrumbConfig, raw string) (string, error)

func ValidateCrumb

func ValidateCrumb(cfg CrumbConfig, req *http.Request, enc_var string, extra ...string) (bool, error)

Types

type CrumbConfig

type CrumbConfig struct {
	Extra     string
	Separator string
	Secret    string
	TTL       int64
}

func DefaultCrumbConfig

func DefaultCrumbConfig() CrumbConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL