diff --git a/hw/application_fpga/tools/b2s/b2s.go b/hw/application_fpga/tools/b2s/b2s.go index bfd9afe..083a366 100644 --- a/hw/application_fpga/tools/b2s/b2s.go +++ b/hw/application_fpga/tools/b2s/b2s.go @@ -7,6 +7,7 @@ import ( "flag" "fmt" "os" + "path" "golang.org/x/crypto/blake2s" ) @@ -16,8 +17,9 @@ func usage() { } func printCDigest(digest [blake2s.Size]byte, fileName string) { - fmt.Printf("// BLAKE2s digest of %v\n", fileName) - fmt.Printf("const uint8_t digest[32] = {\n") + fmt.Printf("#include \n\n") + fmt.Printf("// BLAKE2s digest of %v\n", path.Base(fileName)) + fmt.Printf("const uint8_t allowed_app_digest[32] = {\n") for _, n := range digest { fmt.Printf("0x%02x, ", n) diff --git a/hw/application_fpga/tools/b2s/go.mod b/hw/application_fpga/tools/b2s/go.mod index 5c98d9b..b328422 100644 --- a/hw/application_fpga/tools/b2s/go.mod +++ b/hw/application_fpga/tools/b2s/go.mod @@ -2,8 +2,6 @@ module b2s go 1.23.0 -toolchain go1.23.7 - require golang.org/x/crypto v0.36.0 require golang.org/x/sys v0.31.0 // indirect