add color to svg

This commit is contained in:
2024-10-19 16:36:47 -05:00
parent 9c33a61570
commit aebd25dc16
16 changed files with 318 additions and 142 deletions

View File

@@ -2,6 +2,7 @@ package core
import (
"crypto/sha256"
"errors"
"go-nkode/util"
"golang.org/x/crypto/bcrypt"
)
@@ -64,6 +65,9 @@ func (u *UserCipherKeys) ValidPassword(hashedPassword string, passcodeAttrIdx []
passwordDigest := u.saltAndDigest(passcodeCipher)
err := bcrypt.CompareHashAndPassword(hashBytes, passwordDigest)
if err != nil {
if errors.Is(err, bcrypt.ErrMismatchedHashAndPassword) {
return ErrInvalidNKode
}
return err
}
return nil