Skip to content
vfiebigPublic

About

Simple GO TOTP

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

Repository files navigation

totp

Simple GO TOTP compatible with Google Authenticator, based on RFC4226

https://godoc.org/github.com/vfiebig/totp

usage

package main

import (
	"encoding/base32"
	"github.com/vfiebig/totp"
)

func main() {
	totp_inst := totp.StdTOTP
	totp_inst.K, _ = base32.StdEncoding.DecodeString("BASE32SECRET")

	if _, ok := totp_inst.Validate(123456); ok {
		// Valid token
	} else {
		// Not a valid token
	}
}

About

Simple GO TOTP

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages