Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_LENGTH uint8 = 256 / 8 // DEFAULT_ALGO string = "sha384" DEFAULT_ALGO string = "sha512" // changed to SHA512 from SHA384 to support also Google Authenticator DEFAULT_DIGITS uint8 = 8 DEFAULT_INTERVAL uint16 = 30 DEFAULT_ISSUER string = "SmartGoTOTP2FA" URL_OTPAUTH string = "otpauth://totp/" // just for TOTP ... )
Variables ¶
View Source
var (
DEBUG bool = smart.DEBUG
)
Functions ¶
func IsSecretValid ¶
A non-panic way of seeing weather or not a given secret is valid
func RandomSecret ¶
generate a random secret of given length (number of bytes) returns empty string if something bad happened
Types ¶
type TOTP ¶
type TOTP struct { OTP // contains filtered or unexported fields }
time-based OTP counters.
func (*TOTP) GenerateBarcodeUrl ¶
Click to show internal directories.
Click to hide internal directories.