hash

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package hash provides hashing helpers to generate application tokens that can be used in a web application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HMAC

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

HMAC provides helpers to generate strong application tokens.

func NewHMAC

func NewHMAC(key string) *HMAC

NewHMAC returns an HMAC initialized from a secret key.

func (*HMAC) Hash

func (h *HMAC) Hash(input string) (string, error)

Hash returns the Base64 URL-encoded HMAC hash of the provided input.

Jump to

Keyboard shortcuts

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