auth: base64-encode password hashes (digests)

This commit is contained in:
Helmut Merz 2024-08-18 19:28:03 +02:00
parent 22d9e88295
commit f6b21f9a43
2 changed files with 7 additions and 4 deletions

View file

@ -5,7 +5,8 @@
(:local-nicknames (:config :scopes/config) (:local-nicknames (:config :scopes/config)
(:core :scopes/core) (:core :scopes/core)
(:shape :scopes/shape) (:shape :scopes/shape)
(:util :scopes/util)) (:util :scopes/util)
(:b64 :qbase64))
(:export #:config #:setup (:export #:config #:setup
#:simple-credentials #:simple-credentials
#:login)) #:login))
@ -71,5 +72,7 @@
;;;; auxiliary functions ;;;; auxiliary functions
(defun digest (pw) (defun digest (pw)
(b64:encode-bytes
(ironclad:digest-sequence (ironclad:digest-sequence
:sha3/256 (flexi-streams:string-to-octets pw :external-format :utf8))) :sha3/256 (flexi-streams:string-to-octets pw :external-format :utf8))
:scheme :uri))

View file

@ -7,7 +7,7 @@
:homepage "https://www.cyberconcepts.org" :homepage "https://www.cyberconcepts.org"
:description "Authentication services" :description "Authentication services"
:depends-on (:scopes :depends-on (:scopes
:flexi-streams :ironclad) :flexi-streams :ironclad :qbase64)
:components ((:file "auth")) :components ((:file "auth"))
:long-description "scopes framework: authentication services." :long-description "scopes framework: authentication services."
;;#.(uiop:read-file-string ;;#.(uiop:read-file-string