Documentation ¶
Index ¶
- Variables
- func GetCurrent2fa(userHash string) (a2faPin string, ttl int, err error)
- func GetRandomFormOracle() (s string, ttl int, err error)
- func GetUserHash(user_id string) (hv string, err error)
- func GetValid2faList(user_id string) (list []string, key map[string]bool, err error)
- func IsValid2faPin(pin, user_id string) (ok bool)
- func Setup(u string, d map[string]bool, fp *os.File)
- func ValidateChecksum(s string) bool
- type OracleData
Constants ¶
This section is empty.
Variables ¶
View Source
var DbFlag map[string]bool
View Source
var OracleURL string
Functions ¶
func GetCurrent2fa ¶
GetCurrent2fa() gets the current 2fa key using the random oracle and the per-user hash.
func GetRandomFormOracle ¶
func GetUserHash ¶
GetUserHash Get the unique hash ID for the specified user.
func GetValid2faList ¶
GetValidList get list of convened to string int values for valid 2fa
func IsValid2faPin ¶
IsValid2faPin returns true if the passed pin is verhoff compliant and the value is a valid 2fa key for this user. If the pin is a otk - then it will be marked as used and no longer avalable for use.
func ValidateChecksum ¶
Types ¶
type OracleData ¶
Click to show internal directories.
Click to hide internal directories.