summaryrefslogtreecommitdiff
path: root/utilities.lisp
diff options
context:
space:
mode:
authorColin Okay <colin@cicadas.surf>2022-10-27 07:52:50 -0500
committerColin Okay <colin@cicadas.surf>2022-10-27 07:52:50 -0500
commit0b21729661ed1905eb886b1eba6f8b062305c9a3 (patch)
treec3071c5238d1dc174bfaf42ccad59a88d710f043 /utilities.lisp
parent52c0408569a0b1de932d52e71fee5fb0163782e2 (diff)
Modify+Add: Added pw hashing stuff to user. Add login file.
Diffstat (limited to 'utilities.lisp')
-rw-r--r--utilities.lisp10
1 files changed, 10 insertions, 0 deletions
diff --git a/utilities.lisp b/utilities.lisp
index d36c4db..ec1ae55 100644
--- a/utilities.lisp
+++ b/utilities.lisp
@@ -13,6 +13,16 @@
host
(get-universal-time))))))
+(defun hash-string (plaintext salt)
+ "Hash plaintext using SALT"
+ (flexi-streams:octets-to-string
+ (ironclad:digest-sequence
+ :sha3
+ (flexi-streams:string-to-octets (concatenate 'string salt plaintext)
+ :external-format :utf-8))
+ :external-format :latin1))
+
+
(defun default-name (kind)
(format nil "~a" (gensym kind)))