emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/base32 5065525032 024/103: Update docstrings and readme


From: ELPA Syncer
Subject: [nongnu] elpa/base32 5065525032 024/103: Update docstrings and readme
Date: Sat, 10 Feb 2024 13:00:01 -0500 (EST)

branch: elpa/base32
commit 5065525032522e27998651c0738e558b3fbd82e1
Author: Vivek Das Mohapatra <vivek@collabora.co.uk>
Commit: Vivek Das Mohapatra <vivek@collabora.co.uk>

    Update docstrings and readme
---
 README.md       |  7 +++----
 totp-interop.el | 17 ++++++++++-------
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/README.md b/README.md
index 61a7d6cb8c..6b6b1a0b98 100644
--- a/README.md
+++ b/README.md
@@ -14,8 +14,7 @@ but for now either:
 totp.el will look find its copies of base32.el and hmac.el in
 its own directory by default.
 
-If you want to import TOTP secrets you can load totp-interop
-and invoke:
+If you want to import TOTP secrets you can invoke:
 
   M-x totp-import-file RET
 
@@ -24,8 +23,8 @@ 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 scemes in a text file
-  - QR codes encoding any mix of the URLs above
+  - a mix of the above URL schemes in a text file
+  - QR codes encoding any mix of the URL schemes above
 
 Once you have at least one secret available, invoke:
 
diff --git a/totp-interop.el b/totp-interop.el
index 6ea0014e59..64e348398f 100644
--- a/totp-interop.el
+++ b/totp-interop.el
@@ -194,6 +194,8 @@ OTP secrets+metadata by calling `totp-unwrap-otp-blob' on 
them."
     result))
 
 (defun totp-load-image-file (file)
+  "Use `totp-file-import-command' to extract the contents of FILE
+and process the results with `totp-parse-buffer-otp-urls'."
   (let ((args (mapcar (lambda (a) (if (equal "@file@" a) file a))
                       (cdr totp-file-import-command))))
     (with-temp-buffer
@@ -211,13 +213,14 @@ OTP secrets+metadata by calling `totp-unwrap-otp-blob' on 
them."
         (totp-find-hmac-key-by-class b32-class 64))))
 
 (defun totp-load-file (file)
-  "Load secret(s) from FILE. The file may be a text file containing:
-  - A bare base32 encoded secret (the filename will be used for the label)
-  - Any number of otpauth:// URLs
-Or 
-  - A QR code image understood by `totp-file-import-command`\n
-Returns a list of TOTP secret alists - that is: Each element of 
-the returned list is the same structure returned by `totp-unwrap-otp-blob'."
+  "Load secret(s) from FILE. FILE may be:
+  - a single base32 encoded TOTP secret
+  - any number of otpauth:// scheme URLs
+  - any number of otpauth-migration:// scheme URLs
+  - a mix of entries encoded in the above URL schemes
+  - a QR code understood by `totp-file-import-command'.\n
+Returns a list of TOTP secret alists - that is: Each element of
+the returned list is a structure returned by `totp-unwrap-otp-blob'."
   (let (mime-type result)
     (setq file      (expand-file-name file)
           mime-type (mailcap-extension-to-mime (file-name-extension file)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]