Versions in this module Expand all Collapse all v0 v0.0.2 May 19, 2021 Changes in this version + const EPOCH + type HMACAlgorithm struct + DigestMethod func() hash.Hash + func (a *HMACAlgorithm) GetSignature(key, value string) []byte + func (a *HMACAlgorithm) VerifySignature(key, value string, sig []byte) bool + type Signature struct + Algorithm SigningAlgorithm + DigestMethod func() hash.Hash + KeyDerivation string + Salt string + SecretKey string + Sep string + func NewSignature(secret, salt, sep, derivation string, digest func() hash.Hash, ...) *Signature + func (s *Signature) DeriveKey() (string, error) + func (s *Signature) Get(value string) (string, error) + func (s *Signature) Sign(value string) (string, error) + func (s *Signature) Unsign(signed string) (string, error) + func (s *Signature) Verify(value, sig string) (bool, error) + type SigningAlgorithm interface + GetSignature func(key, value string) []byte + VerifySignature func(key, value string, sig []byte) bool + type TimestampSignature struct + func NewTimestampSignature(secret, salt, sep, derivation string, digest func() hash.Hash, ...) *TimestampSignature + func (s *TimestampSignature) Sign(value string) (string, error) + func (s *TimestampSignature) Unsign(value string, maxAge uint32) (string, error)