Skip to content

Commit

Permalink
Update yespower.go
Browse files Browse the repository at this point in the history
  • Loading branch information
mraksoll4 committed Apr 25, 2023
1 parent 5ecbdf7 commit ce59cfa
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions yespower.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,18 +523,14 @@ func YespowerHash(input []byte) []byte {
timeBytes := input[68:72]
time := binary.LittleEndian.Uint32(timeBytes)

var result string
var result []byte
if time > 1676761800 {
result = Yescrypt(input, 4096, 16, "Client Key")
resultHex := Yescrypt(input, 4096, 16, "Client Key")
result, _ = hex.DecodeString(resultHex)
} else {
result = Yespower(input, 2048, 32, "")
resultHex := Yespower(input, 2048, 32, "")
result, _ = hex.DecodeString(resultHex)
}

hashBytes, err := hex.DecodeString(result)
if err != nil {
fmt.Printf("Error decoding hex string: %s\n", err)
return nil
}

return hashBytes
return result
}

0 comments on commit ce59cfa

Please sign in to comment.