Skip to content

Commit

Permalink
Fix favorites list password test
Browse files Browse the repository at this point in the history
  • Loading branch information
hashworks committed Aug 24, 2016
1 parent bc51706 commit cea92a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xrel/types/favs.go
Expand Up @@ -3,6 +3,7 @@ package types
import (
"crypto/sha1"
"encoding/hex"
"strconv"
)

type FavList struct {
Expand All @@ -29,7 +30,7 @@ func (f *FavList) TestPassword(password string) bool {
}

h := sha1.New()
h.Write([]byte(password))
h.Write([]byte(strconv.Itoa(f.ID) + "\n\r" + password))
passwordHashString := hex.EncodeToString(h.Sum(nil))

for i := 0; i < h.Size(); i++ {
Expand Down

0 comments on commit cea92a1

Please sign in to comment.