Skip to content

Commit ce59cfa

Browse files
committed
Update yespower.go
1 parent 5ecbdf7 commit ce59cfa

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

yespower.go

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -523,18 +523,14 @@ func YespowerHash(input []byte) []byte {
523523
timeBytes := input[68:72]
524524
time := binary.LittleEndian.Uint32(timeBytes)
525525

526-
var result string
526+
var result []byte
527527
if time > 1676761800 {
528-
result = Yescrypt(input, 4096, 16, "Client Key")
528+
resultHex := Yescrypt(input, 4096, 16, "Client Key")
529+
result, _ = hex.DecodeString(resultHex)
529530
} else {
530-
result = Yespower(input, 2048, 32, "")
531+
resultHex := Yespower(input, 2048, 32, "")
532+
result, _ = hex.DecodeString(resultHex)
531533
}
532534

533-
hashBytes, err := hex.DecodeString(result)
534-
if err != nil {
535-
fmt.Printf("Error decoding hex string: %s\n", err)
536-
return nil
537-
}
538-
539-
return hashBytes
535+
return result
540536
}

0 commit comments

Comments
 (0)