aboutsummaryrefslogtreecommitdiff
path: root/Readme.textile
blob: d824368846f9870b379adeba4b65976078524a66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
h1. twofa

p. A terrible, should-not-be-used, wrote-it-for-fun-and-learning 2fa authenticator.

h2. Requirements

p. twofa requires the _base32_ and _optimist_ gems.

h3. Clipboard

p. For clipboard tasks, twofa requires the _clipboard_ gem, and either the _xclip_ or _xsel_ application.

h2. Usage

bc.. $ twofa -h
twofa is a command line OTP code generator.

Usage:
  twofa [opts] ISSUER

where [opts] are:
  -n, --no-clip           Do not copy code to the clipboard
  -t, --twofa-file=<s>    Location of the twofa secrets file (default: /home/nl987/.twofa)
  -v, --version           Print version and exit
  -h, --help              Show this message

h3. twofa secrets file

p. The twofa secrets file is normally found at @~./twofa@, and each record has the following fields. If any of the optional fields are given, all preceeding optional fields must also be given.

p. If a HOTP code is requested, the file will be canoncalised.

p. Each issuer should appear on it's own line with the following format:

bc. Method Issuer Secret [TDC [Length [Hash]]]

h4. Required fields

- Method := The OTP type, currently @totp@ or @hotp@.
- Issuer := Human name to identify this issuer.
- Secret := The BASE32 shared secret.

h4. Optional fields

- TDC := Either the time delta (for TOTP) or counter (for HOTP). The former defaults to 30 if not given, the latter to 0.
- Length := The output code length. Defaults to 6 digits.
- Hash := The algorithm used to generate the HMAC hash. Defaults to @sha1@.