package
module
Version:
v0.0.0-...-08549c3
Opens a new window with list of versions in this module.
Published: Jan 19, 2020
License: MIT
Opens a new window with license information.
Imports: 10
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
HOTP, TOTP (short-lived OTP values, which are desirable for enhanced security)
Usage
package main
import (
"fmt"
"github.com/kbukum/hotp"
)
func main() {
totp := hotp.TOTP{
OTP: hotp.OTP{
SharedSecret: "Secret Key",
Digits: 8,
Crypto:hotp.SHA1,
},
StartTime: 0,
TimeStep: 30,
}
fmt.Println(totp.Password())
}
REFERENCES
Documentation
¶
View Source
var (
DigitPowers = []int64{1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 10000000000, 100000000000}
)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.