branch: elpa/base32
commit e9c93296615551da2a0594014affadfacda9d312
Author: Vivek Das Mohapatra <[email protected]>
Commit: Vivek Das Mohapatra <[email protected]>
Prepare for package archive inclusion
---
README | 40 ++++++++++++++++++++++++++++++++++++++++
totp.el | 6 +++++-
2 files changed, 45 insertions(+), 1 deletion(-)
diff --git a/README b/README
new file mode 100644
index 0000000000..17bc655506
--- /dev/null
+++ b/README
@@ -0,0 +1,40 @@
+totp.el - Time-based One Time Password support for emacs
+
+This package generates RFC6238 Time-based One Time Passwords
+and displays them (as well as optionally copying them to
+the clipbpoard/primary selection), updating them as they expire.
+
+It stores and retrieves the shared secrets used to generate TOTP
+tokens based on ‘auth-sources’ and/or the freedesktop secrets API
+(aka Gnome Keyring or KWallet).
+
+You can call it with the command ‘totp’, ie:
+
+ M-x totp RET
+
+You can tab-complete based on the label of the secret and a
+buffer displaying the token will be displayed (and updated as
+the displayed token expires).
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+If you want to import TOTP secrets from other apps you can call:
+
+ M-x totp-import-file RET
+
+This supports:
+
+ - simple base32 encoded TOTP secrets (max 1 per file)
+ - otpauth:// scheme URLs in a text file (any number per file)
+ - otpauth-migration:// scheme URLs in a text file (any number per file)
+ - a mix of the above URL schemes in a text file
+ - QR codes encoding any mix of the URL schemes above
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+Your secrets can be fetched from any auth-source source.
+
+Your secrets will only ever be stored by this package in
+auth-source backends that are encrypted.
+
+You secret(s) are only held in memory while a TOTP is being
+generated, or while a TOTP display buffer is being updated.
diff --git a/totp.el b/totp.el
index 117cfe5728..e8788e36a0 100644
--- a/totp.el
+++ b/totp.el
@@ -3,7 +3,10 @@
;; SPDX-License-Identifier: GPL-3.0-or-later
;; Author: Vivek Das Mohapatra <[email protected]>
-;; Keywords: 2FA two-factor totp otp
+;; Keywords: 2FA two-factor totp otp password
+;; URL: https://gitlab.com/fledermaus/totp.el
+;; Version: 0.1
+;; Package-Requires: ((emacs "27.1"))
;;; Commentary:
;; Import TOTP secrets, store and fetch them from auth-sources, and
@@ -577,6 +580,7 @@ OTP and TOKEN are used internally and need not be passed."
(pop-to-buffer ui-buffer)
(run-with-timer 0 1 #'totp-update-token-display ui-buffer)))
+;;;###autoload
(defun totp (&optional secret label)
"Generate a TOTP token for SECRET, identified by LABEL, and show it."
(interactive