aboutsummaryrefslogtreecommitdiffhomepage
path: root/utilities.lisp
diff options
context:
space:
mode:
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)))