From 5a27585bbb467802c579ae3a1d043e31cd8c315d Mon Sep 17 00:00:00 2001
From: Nat Lasseter <nat.lasseter@york.ac.uk>
Date: Thu, 29 Sep 2022 12:27:19 +0100
Subject: Added HOTP functionality

---
 Readme.textile | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

(limited to 'Readme.textile')

diff --git a/Readme.textile b/Readme.textile
index 3051c29..8997f39 100644
--- a/Readme.textile
+++ b/Readme.textile
@@ -13,7 +13,7 @@ p. For clipboard tasks, twofa requires the _clipboard_ gem, and either the _xcli
 h2. Usage
 
 bc.. $ twofa -h
-twofa is a command line TOTP code generator.
+twofa is a command line OTP code generator.
 
 Usage:
   twofa [opts] ISSUER
@@ -26,6 +26,18 @@ where [opts] are:
 
 h3. twofa secrets file
 
-p. The twofa secrets file is normally found at @~./twofa@, and has the format:
+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.
 
-bc. ISSUER SECRET [interval | default(30)] [length | default(6)] [hashing algorithm | default(sha1)]
+p. If a HOTP code is requested, the file will be canoncalised.
+
+h4. Required fields
+
+- Method := The OTP type, currently @totp@ or @hotp@
+- Issuer := Human name for this issuer
+- Secret := The BASE32 shared secret
+
+h4. Optional fields
+
+- Time interval or Counter := Either the time interval (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.
+- Hashing algorithm := The algorithm used to generate the HMAS hash. Defaults to @sha1@.
-- 
cgit v1.2.3

