aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--go-src/user.go2
2 files changed, 0 insertions, 3 deletions
diff --git a/README.md b/README.md
index 3dfd6a9..0da5b81 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,6 @@ Each user must have the following properties:
- `string Name`: between 2 and 60 characters (A-z, spaces, ', -)
Two users can't have the same UserName. Once set, a UserName cannot be changed.
-Passwords must be hashed. You decide on which algorithm to use.
### Chat rooms
diff --git a/go-src/user.go b/go-src/user.go
index 9b49fd1..be01b3e 100644
--- a/go-src/user.go
+++ b/go-src/user.go
@@ -22,7 +22,6 @@ const (
)
func (u User) ValidatePassword(password string) bool {
- // TODO: Implement hashing
f, _ := os.ReadFile(folderPaths.FileAtUsersFolder(u.Username))
passHash := bytes.Split(f, []byte("\n"))[1]
return string(passHash) == password
@@ -64,7 +63,6 @@ func logoutUser() {
}
func createUser(data []string) {
- // TODO: Password hashing
f, _ := os.Create(folderPaths.FileAtUsersFolder(data[0]))
f.WriteString(data[0] + "\n" + data[1] + "\n" + data[2])
f.Close()