diff --git a/lib/main.go b/lib/main.go index c9351ad..8211303 100644 --- a/lib/main.go +++ b/lib/main.go @@ -646,14 +646,14 @@ func PackageEPK(metaData Metadata, build Build, tempDir string, output string, p } // Create the hash writer - sha512Hash := xxhash.New() - _, err = sha512Hash.Write(dataTemplateBytes) + xxHash := xxhash.New() + _, err = xxHash.Write(dataTemplateBytes) if err != nil { return err, nil } // Create a multi-writer so we can write to the file and the hash at the same time - multiWriter := io.MultiWriter(file, sha512Hash) + multiWriter := io.MultiWriter(file, xxHash) // Create the ZStandard writer writer, err := zstd.NewWriter(multiWriter, zstd.WithEncoderLevel(zstd.SpeedDefault)) @@ -679,7 +679,7 @@ func PackageEPK(metaData Metadata, build Build, tempDir string, output string, p }) // Sign the hash - signature := ed25519.Sign(privateKey, sha512Hash.Sum(nil)) + signature := ed25519.Sign(privateKey, xxHash.Sum(nil)) publicKey := privateKey.Public().(ed25519.PublicKey) // Write the signature and public key to the file