hmac

package
v0.0.0-...-a4359f9 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HMAC

type HMAC struct {
	Key []byte
}

HMAC is a utility for creating and verifying HMACs

func (*HMAC) Create

func (h *HMAC) Create(message string) (string, error)

Create creates a HMAC based on the parameter values, encoded as urlsafe base64

func (*HMAC) Validate

func (h *HMAC) Validate(message, mac string) (bool, error)

Validate validates that the parameter values matches a given HMAC

Jump to

Keyboard shortcuts

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