otp/totp_example_test.go

16 lines
206 B
Go

package otp_test
import (
"fmt"
"dev.justinjudd.org/justin/otp"
)
func Example_tOTP() {
o := otp.NewTOTPKeyOptions()
o.Secret = []byte("Some Secret")
k := otp.NewTOTPKey(o)
fmt.Println(k.OTP())
}