argon2 experiment

This commit is contained in:
2025-05-22 22:29:58 +03:00
parent 74a0ae5027
commit ddad153875
5 changed files with 24 additions and 8 deletions

View File

@ -1,4 +1,4 @@
local bcrypt = require("bcrypt")
local auth = require("lib.auth")
local models = require("models")
local constants = require("constants")
@ -29,7 +29,7 @@ local function create_admin()
password = password .. alphabet:sub(randi, randi)
end
local hash = bcrypt.digest(password, constants.BCRYPT_ROUNDS)
local hash = auth.digest(password)
models.Users:create({
username = username,