Documentation ¶
Overview ¶
Package gauth implements the time-based OTP generation scheme used by Google Authenticator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IndexNow ¶
IndexNow returns the current 30-second time slice index, and the number of seconds remaining until it ends.
func LoadConfigFile ¶
LoadConfigFile reads and decrypts, if necessary, the CSV config at path. The getPass function is called to obtain a password if needed.
func ParseConfig ¶
ParseConfig parses the contents of data as a gauth configuration file. Each line of the file specifies a single configuration.
The basic configuration format is:
name:secret
where "name" is the site name and "secret" is the base32-encoded secret. This represents a default Google authenticator code with 6 digits and a 30-second refresh.
Otherwise, a line must be a URL in the format:
otpauth://TYPE/LABEL?PARAMETERS
Types ¶
This section is empty.