[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/base32 614354718d 007/103: Make totp-generate-otp understa
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/base32 614354718d 007/103: Make totp-generate-otp understand secret structs and base32 strings |
Date: |
Sat, 10 Feb 2024 12:59:52 -0500 (EST) |
branch: elpa/base32
commit 614354718d1d171c19f6438899c1024d9a83185a
Author: Vivek Das Mohapatra <vivek@collabora.co.uk>
Commit: Vivek Das Mohapatra <vivek@collabora.co.uk>
Make totp-generate-otp understand secret structs and base32 strings
---
totp.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/totp.el b/totp.el
index 9015606b6c..b2a39095de 100644
--- a/totp.el
+++ b/totp.el
@@ -339,13 +339,15 @@ with the highest bit forced to 0 (ie a 31 bit integer)."
(defun totp-generate-otp (secret &optional digits offset chunk algo)
"Given:
- a string SECRET
+ a string (or `totp-unwrap-otp-blob' struct) SECRET
a TOTP length DIGITS (default 6)
an integer time skew OFFSET (default 0)
a time slice size CHUNK (default 30)
Return (TOTP TTL EXPIRY) where TOTP is the time-based one time password,
TTL is the number of seconds the password is good for at the time of generation
and EXPIRY is the seconds after the epoch when the TOTP expires."
+ (if (listp secret)
+ (setq secret (cdr (assq :secret secret))))
(let ((digits (or digits 6))
(offset (or offset 0))
(chunk (or chunk 30))
- [nongnu] branch elpa/base32 created (now 5fa6529ace), ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 8d27869a96 002/103: Initial check in of TOTP token generation, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 4595bb3b7c 008/103: Make the returned TOTP token a string so we don't lose leading 0s, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 93aa724afe 011/103: Improve the UI to display a constantly updated TOTP token, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 8b74f66db2 014/103: Update README, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 614354718d 007/103: Make totp-generate-otp understand secret structs and base32 strings,
ELPA Syncer <=
- [nongnu] elpa/base32 8f865c378e 001/103: Initial commit, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 545cf69323 004/103: Simplify the totp-secrets-create-item-workaround custom entry, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 2ded2a7cef 003/103: Replace generic gitlab README with something more useful, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 34d9df6232 006/103: Split out the standard label generation code, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 0146fe6b91 010/103: Minor formatting trivia in the test file, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 b7e1daca76 009/103: Comment out some spurious calls in the test file, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 4432d44bce 012/103: Trivia: clean up some docstrings, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 a683df1a74 013/103: Add a separate instance of an `auth-sources' list just for TOTP, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 5c902928f7 017/103: Fix bug in otpauth-migration URL decoder, ELPA Syncer, 2024/02/10
- [nongnu] elpa/base32 f27043d432 019/103: Fix some byte compilation warnings, ELPA Syncer, 2024/02/10