0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 07:29:08 -05:00

🐛 Fix secret hash size to match JWT tokens

This commit is contained in:
mathieu.brunot 2019-02-17 19:04:07 +01:00
parent 06cb9d9808
commit e72f864ee9
No known key found for this signature in database
GPG key ID: 81584BEAF692D7E0
3 changed files with 3 additions and 3 deletions

View file

@ -77,7 +77,7 @@
(when-not secret
(ex/raise :code ::missing-secret-key
:message "Missing `:secret` key in config."))
(hash/blake2b-512 secret)))
(hash/blake2b-256 secret)))
(defstate secret
:start (initialize-secret config))

View file

@ -27,7 +27,7 @@
(defn digest
[^bytes data]
(-> (hash/blake2b-512 data)
(-> (hash/blake2b-256 data)
(b64/encode true)
(codecs/bytes->str)))

View file

@ -17,7 +17,7 @@
using urlsafe variant of base64."
[]
(-> (nonce/random-bytes 1024)
(hash/blake2b-512)
(hash/blake2b-256)
(b64/encode true)
(codecs/bytes->str)))