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:
parent
06cb9d9808
commit
e72f864ee9
3 changed files with 3 additions and 3 deletions
|
@ -77,7 +77,7 @@
|
||||||
(when-not secret
|
(when-not secret
|
||||||
(ex/raise :code ::missing-secret-key
|
(ex/raise :code ::missing-secret-key
|
||||||
:message "Missing `:secret` key in config."))
|
:message "Missing `:secret` key in config."))
|
||||||
(hash/blake2b-512 secret)))
|
(hash/blake2b-256 secret)))
|
||||||
|
|
||||||
(defstate secret
|
(defstate secret
|
||||||
:start (initialize-secret config))
|
:start (initialize-secret config))
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
(defn digest
|
(defn digest
|
||||||
[^bytes data]
|
[^bytes data]
|
||||||
(-> (hash/blake2b-512 data)
|
(-> (hash/blake2b-256 data)
|
||||||
(b64/encode true)
|
(b64/encode true)
|
||||||
(codecs/bytes->str)))
|
(codecs/bytes->str)))
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
using urlsafe variant of base64."
|
using urlsafe variant of base64."
|
||||||
[]
|
[]
|
||||||
(-> (nonce/random-bytes 1024)
|
(-> (nonce/random-bytes 1024)
|
||||||
(hash/blake2b-512)
|
(hash/blake2b-256)
|
||||||
(b64/encode true)
|
(b64/encode true)
|
||||||
(codecs/bytes->str)))
|
(codecs/bytes->str)))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue