Skip to content

Commit

Permalink
g
Browse files Browse the repository at this point in the history
  • Loading branch information
komuw committed Sep 16, 2024
1 parent 24e824a commit 45f9f28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cry/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ func Hash(password string) string {

// Add version, salt to the derived key.
// The salt and the derived key are hex encoded.
// NB: We could include the other params(_time, memory, threads) in this serialization.
// But we don't for simplicity & also because those params are hardcoded for each cry version.
return fmt.Sprintf(
`%d%s%x%s%x`,
version,
Expand All @@ -54,7 +56,6 @@ func Hash(password string) string {
func Eql(password, hash string) error {
params := strings.Split(hash, "$")

fmt.Println("\n\t params: ", params)
if len(params) != 3 {
return errors.New("ong/cry: unable to parse")
}
Expand Down

0 comments on commit 45f9f28

Please sign in to comment.