otp

package module
v0.0.0-...-b872390 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PinGenerator

type PinGenerator struct {
}

PinGenerator implements logic for generating and verifying otp pin codes.

func NewPinGenerator

func NewPinGenerator() *PinGenerator

NewPinGenerator creates a new instance of PinGenerator.

func (*PinGenerator) Generate

func (p *PinGenerator) Generate(_ string) string

Generate generates a new pin based on challenge

func (*PinGenerator) Validate

func (p *PinGenerator) Validate(challenge string, userInput string) bool

Validate validates pin

Jump to

Keyboard shortcuts

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