Files
MTranServer/bin/utils.go
xxnuo b2e9c24c0b Update Makefile
Update Makefile

Update Makefile

Update Makefile

Update gen_records.go

Update build.yml

Update build.yml

fix: cross build

Update build.yml

fix: cross build

Update build.yml

Update build.yml
2025-11-09 03:07:35 +08:00

17 lines
429 B
Go

package bin
import "crypto/sha256"
//go:generate env GOOS= GOARCH= go run gen_update.go
//go:generate env GOOS= GOARCH= go run gen_hash.go
// GetWorkerInfo returns information about the embedded worker binary
func GetWorkerInfo() (hash string, size int) {
return WorkerHash, len(WorkerBinary)
}
// ComputeHash computes the SHA256 hash of the given data
func ComputeHash(data []byte) [32]byte {
return sha256.Sum256(data)
}