summaryrefslogtreecommitdiff
path: root/kasi-totp.el
diff options
context:
space:
mode:
Diffstat (limited to 'kasi-totp.el')
-rw-r--r--kasi-totp.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/kasi-totp.el b/kasi-totp.el
index f22c30c..5a54397 100644
--- a/kasi-totp.el
+++ b/kasi-totp.el
@@ -86,8 +86,8 @@ concept of encoding partial quanta is not implemented fully."
86 (setq string (upcase string)) 86 (setq string (upcase string))
87 (let* ((trimmed-array (append (string-trim-right string "=+") nil)) 87 (let* ((trimmed-array (append (string-trim-right string "=+") nil))
88 (hex (format "%X" (seq-reduce 88 (hex (format "%X" (seq-reduce
89 (lambda (acc char) (+ (ash acc 5) (aref base32-alphabet char))) 89 (lambda (acc char) (+ (ash acc 5) (aref base32-alphabet char)))
90 trimmed-array 0)))) 90 trimmed-array 0))))
91 (if (cl-oddp (length hex)) 91 (if (cl-oddp (length hex))
92 (concat "0" hex) 92 (concat "0" hex)
93 hex))) 93 hex)))