auth

package
v0.0.0-...-4b57445 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const HMACLength = 32 // 256 / 8

Variables

This section is empty.

Functions

func CalcHMAC

func CalcHMAC(body []byte) ([]byte, error)

func CheckHMAC

func CheckHMAC(expectedHMAC []byte, body []byte) (bool, error)

func GetHMACFromHeader

func GetHMACFromHeader(c *gin.Context) ([]byte, error)

Types

type HMACMismatchError

type HMACMismatchError struct{}

func (*HMACMismatchError) Error

func (e *HMACMismatchError) Error() string

type InvalidHMACLengthError

type InvalidHMACLengthError struct{}

func (*InvalidHMACLengthError) Error

func (e *InvalidHMACLengthError) Error() string

type NoHMACError

type NoHMACError struct{}

func (*NoHMACError) Error

func (e *NoHMACError) Error() string

Jump to

Keyboard shortcuts

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