From 2c95bc0a0f04a67196c7625e793be561d897cf47 Mon Sep 17 00:00:00 2001 From: perp Date: Mon, 3 Jun 2024 14:07:22 +0100 Subject: [PATCH] Added bcrypt cost --- cmd/config.toml | 3 +++ internal/config/config.go | 1 + 2 files changed, 4 insertions(+) diff --git a/cmd/config.toml b/cmd/config.toml index b3f4545..ed04d5c 100644 --- a/cmd/config.toml +++ b/cmd/config.toml @@ -3,6 +3,9 @@ secret = "a key" # Disable registration disabled = false +# bcrypt cost +# https://pkg.go.dev/golang.org/x/crypto/bcrypt#pkg-constants +cost = 10 [server] # Listener address diff --git a/internal/config/config.go b/internal/config/config.go index 0b8a980..a1e1762 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -26,6 +26,7 @@ type Config struct { type Auth struct { Secret string `toml:"secret"` Disabled bool `toml:"disabled"` + Cost int `toml:"cost"` } // Server configuration