authenticator

package
v0.0.0-...-43ecf84 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(hashed, password string) error

func Decrypt

func Decrypt(key, ct string) (string, error)

func Encrypt

func Encrypt(key, pt string) (string, error)

func Hash

func Hash(password string) (string, error)

Types

type Authenticator

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

func New

func New(secret string) Authenticator

func (*Authenticator) Parse

func (a *Authenticator) Parse(tokenString string) (string, error)

func (*Authenticator) Sign

func (a *Authenticator) Sign(username string) (string, time.Time, error)

Jump to

Keyboard shortcuts

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