mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-11-26 10:26:29 -05:00
tool: Change b2s to output exact variable used
- Use correct name. - Don't declare it as static. - Lose the toolchain - Use only basename of path in the b2s comment
This commit is contained in:
parent
13767ee7df
commit
d3492e2a34
2 changed files with 4 additions and 4 deletions
|
|
@ -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 <stdint.h>\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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue