Reset SQL

This commit is contained in:
Magnus Åhall 2026-05-26 11:02:56 +02:00
parent 75d242c041
commit 4c513a5106
12 changed files with 538 additions and 570 deletions

View file

@ -1,19 +0,0 @@
CREATE FUNCTION public.password_hash(salt_hex char(32), pass bytea)
RETURNS char(96)
LANGUAGE plpgsql
AS
$$
BEGIN
RETURN (
SELECT
salt_hex ||
encode(
sha256(
decode(salt_hex, 'hex') || /* salt in binary */
pass /* password */
),
'hex'
)
);
END;
$$;