diff --git a/lib/philomena_web/views/user_attribution_view.ex b/lib/philomena_web/views/user_attribution_view.ex index 2f930749..c2c47a38 100644 --- a/lib/philomena_web/views/user_attribution_view.ex +++ b/lib/philomena_web/views/user_attribution_view.ex @@ -28,8 +28,10 @@ defmodule PhilomenaWeb.UserAttributionView do id = Attribution.object_identifier(object) user_id = Attribution.best_user_identifier(object) + {:ok, <>} = :pbkdf2.pbkdf2(:sha256, id <> user_id, salt, 100, 2) + hash = - (:erlang.crc32(salt <> id <> user_id) &&& 0xFFFF) + key |> Integer.to_string(16) |> String.pad_leading(4, "0")