diff options
| author | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-09-11 18:27:53 +0300 |
|---|---|---|
| committer | Syndamia <kamen.d.mladenov@protonmail.com> | 2021-09-11 18:27:53 +0300 |
| commit | 5a986d4e817fdd28d963c78246380fd489b137dd (patch) | |
| tree | 1d38076fe048cb8e5515591f40cb9ce0b4f31513 | |
| parent | 84fa5c99c5e226d6dcd2af4b3cc9583173500d30 (diff) | |
| download | ctfc-5a986d4e817fdd28d963c78246380fd489b137dd.tar ctfc-5a986d4e817fdd28d963c78246380fd489b137dd.tar.gz ctfc-5a986d4e817fdd28d963c78246380fd489b137dd.zip | |
Removed password hashing obligation
| -rw-r--r-- | README.md | 1 | ||||
| -rw-r--r-- | go-src/user.go | 2 |
2 files changed, 0 insertions, 3 deletions
@@ -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() |
