rfc6238

package
v0.1.81 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDigit = 6       // the number of HOTP digit
	Version      = "0.1.0" // out first version
)
View Source
const (
	T0 = 0
)

Variables

View Source
var (
	ErrHMAC = errors.New("HMAC error")
)

Functions

This section is empty.

Types

type Hotp

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

func NewHotp

func NewHotp(f func() hash.Hash, s []byte, d int) *Hotp

func (*Hotp) Get

func (h *Hotp) Get(c uint64) (uint32, error)

type Totp

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

func New

func New(f func() hash.Hash, s []byte, d int, step int) *Totp

func (*Totp) Get

func (t *Totp) Get(time uint64) (uint32, error)

func (*Totp) GetNow

func (t *Totp) GetNow() (uint32, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳