Skip to content

Commit bd221cb

Browse files
committed
Let's try to make it a bit faster
1 parent 07f44c0 commit bd221cb

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

lib/global_api/skins/skin_storage.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ defmodule GlobalApi.Skins.SkinStorage do
3131
])
3232
|> Jason.encode!()
3333

34-
identifier = Blake2.hash2b(final_data, 32)
34+
identifier = :crypto.hash(:blake2b, final_data)
3535

3636
DatabaseQueue.async_fn_call(fn ->
3737
Repo.insert(%Schema{hash: identifier, skin: final_data, code: convert_code}, on_conflict: :nothing)

mix.exs

-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ defmodule GlobalApi.MixProject do
3939
# Type `mix help deps` for examples and options.
4040
defp deps do
4141
[
42-
{:blake2, "~> 1.0.4"},
4342
{:phoenix, "~> 1.6.13"},
4443
{:phoenix_live_reload, "~> 1.3.3", only: :dev},
4544
{:phoenix_live_view, "~> 0.18.1"},

0 commit comments

Comments
 (0)