hotp

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2019 License: BSD-3-Clause Imports: 4 Imported by: 0

README

Documentation Go Report Card License builds.sr.ht status

hotp

A simple RFC 4226 golang HOTP package

Description

todo

How to Use the package

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error added in v0.2.0

type Error string

Error is the type helping defining errors as constants.

func (Error) Error added in v0.2.0

func (e Error) Error() string

Error is the type helping defining errors as constants.

type Hotp

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

Hotp define the HOTP parameters struct

func New

func New(f func() hash.Hash, secret []byte, d int) *Hotp

New creates a new HOTP struct f the hash function to use for HMAC secret define the secret associated d the number of digits

func (*Hotp) Get

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

Get will give you the code with the value c

Jump to

Keyboard shortcuts

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