From b816154e3b368ecdb6c972db6c0e93f643a9e67a Mon Sep 17 00:00:00 2001 From: Sergey Chubaryan Date: Thu, 20 Feb 2025 06:52:10 +0300 Subject: [PATCH] increase bcrypt difficulty --- internal/core/utils/password.go | 2 +- tests/performance/shortlink.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/core/utils/password.go b/internal/core/utils/password.go index 304b850..14e19ec 100644 --- a/internal/core/utils/password.go +++ b/internal/core/utils/password.go @@ -26,7 +26,7 @@ type passwordUtil struct { } func (b *passwordUtil) Hash(password string) (string, error) { - bytes, _ := bcrypt.GenerateFromPassword([]byte(password), 8) //bcrypt.DefaultCost) + bytes, _ := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost) return string(bytes), nil } diff --git a/tests/performance/shortlink.py b/tests/performance/shortlink.py index 8fb0e46..8c30cb1 100644 --- a/tests/performance/shortlink.py +++ b/tests/performance/shortlink.py @@ -7,5 +7,5 @@ class ShortlinkCreate(FastHttpUser): self.api = BackendApi(self.client) @task - def user_create_test(self): + def shortlink_create_test(self): self.api.shortlink_create("https://example.com") \ No newline at end of file