mac

package
v0.0.0-...-a5f7211 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Message Authentication Code - to make sure a message is not tampered with while in-transit by a malicious party. Small usability wrapper around crypto/hmac

Index

Constants

This section is empty.

Variables

View Source
var ErrMacValidationFailed = errors.New("MAC validation failed")

Functions

This section is empty.

Types

type Mac

type Mac struct {
	// contains filtered or unexported fields
}

func New

func New(key string, message string) *Mac

func (*Mac) Authenticate

func (m *Mac) Authenticate(givenMac string) error

func (*Mac) Sign

func (m *Mac) Sign() string

NOTE: entropy is lowered for prettier URLs

Jump to

Keyboard shortcuts

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