This commit is contained in:
Magnus Åhall 2024-11-29 09:15:42 +01:00
parent bd4a475923
commit 9a164b984a
36 changed files with 2500 additions and 77 deletions

10
sql/00007.sql Normal file
View file

@ -0,0 +1,10 @@
CREATE TABLE public.crypto_key (
id serial NOT NULL,
user_id int4 NOT NULL,
description varchar(255) NOT NULL DEFAULT '',
"key" char(144) NOT NULL,
CONSTRAINT crypto_key_pk PRIMARY KEY (id),
CONSTRAINT crypto_key_fk FOREIGN KEY (user_id) REFERENCES public."user"(id) ON DELETE CASCADE ON UPDATE CASCADE
);
COMMENT ON COLUMN public.crypto_key.key IS 'salt(16 bytes) + [key encrypted with pbkdf2(pass, salt)]';