-- Collection of code snippets by Arne Vajhøj 
-- (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
CREATE TABLE webusers (
    usr VARCHAR(20) NOT NULL,
    pwd VARCHAR(255)  NOT NULL,
    PRIMARY KEY(usr)
);
CREATE TABLE webroles (
    usr VARCHAR(20) NOT NULL,
    role VARCHAR(20)  NOT NULL,
    PRIMARY KEY(usr,role)
);
--C:\Apache\apache-tomcat-8.5.12\bin>digest -a sha-512 -i 1000 -s 32 secret
--secret:4356f3c7e5e4591f3aa6a984cf1e48a7ab00af6412588b0305b8d4c493b9a501$1000$bc17f265f840b1c10c0f80e29617debc41f0aeca01f50b763204266e7ec7fbf4119987fb88e4b7be193007e58f4d219af9dc942a218503f6aa360eee67c97f83
INSERT INTO webusers VALUES('arne', '4356f3c7e5e4591f3aa6a984cf1e48a7ab00af6412588b0305b8d4c493b9a501$1000$bc17f265f840b1c10c0f80e29617debc41f0aeca01f50b763204266e7ec7fbf4119987fb88e4b7be193007e58f4d219af9dc942a218503f6aa360eee67c97f83');
INSERT INTO webroles VALUES('arne', 'user');
INSERT INTO webroles VALUES('arne', 'admin');
