diff --git a/backend/src/uxbox/config.clj b/backend/src/uxbox/config.clj index c49969108d..2e65dfbb1f 100644 --- a/backend/src/uxbox/config.clj +++ b/backend/src/uxbox/config.clj @@ -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)) diff --git a/backend/src/uxbox/util/response.clj b/backend/src/uxbox/util/response.clj index 1ca733bb78..4ecf79dae9 100644 --- a/backend/src/uxbox/util/response.clj +++ b/backend/src/uxbox/util/response.clj @@ -27,7 +27,7 @@ (defn digest [^bytes data] - (-> (hash/blake2b-512 data) + (-> (hash/blake2b-256 data) (b64/encode true) (codecs/bytes->str))) diff --git a/backend/src/uxbox/util/token.clj b/backend/src/uxbox/util/token.clj index 5fb993729f..605c9af1f6 100644 --- a/backend/src/uxbox/util/token.clj +++ b/backend/src/uxbox/util/token.clj @@ -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)))