that was dumb

This commit is contained in:
Kyle Isom 2025-05-09 18:13:39 -07:00
parent 2eb3fb4828
commit 0ef669352f
1 changed files with 1 additions and 4 deletions

View File

@ -4,7 +4,6 @@ import (
"crypto/subtle" "crypto/subtle"
"errors" "errors"
"fmt" "fmt"
"log"
"time" "time"
"github.com/oklog/ulid/v2" "github.com/oklog/ulid/v2"
@ -33,8 +32,7 @@ type Login struct {
} }
func derive(password string, salt []byte) ([]byte, error) { func derive(password string, salt []byte) ([]byte, error) {
fmt.Println("deriving") return scrypt.Key([]byte(password), salt, scryptN, scryptR, scryptP, 30)
return scrypt.Key([]byte(password), salt, scryptN, scryptR, scryptN, 32)
} }
func (u *User) Check(login *Login) bool { func (u *User) Check(login *Login) bool {
@ -75,7 +73,6 @@ func (u *User) Register(login *Login) error {
if err != nil { if err != nil {
return fmt.Errorf("key derivation failed: %w", err) return fmt.Errorf("key derivation failed: %w", err)
} }
log.Println("underived")
u.Created = time.Now().Unix() u.Created = time.Now().Unix()
return nil return nil