apc-p15-tool/main.go
Greg T. Wallace 02c0c1216f initial commit: header
* func to write the header APC NMC expects
2024-01-19 17:26:14 -05:00

37 lines
515 B
Go

package main
import (
"log"
"os"
)
func main() {
p15Bytes, err := os.ReadFile("./apc9138a8cert-no-header.p15")
if err != nil {
panic(err)
}
apcHeader, err := makeFileHeader(p15Bytes)
if err != nil {
panic(err)
}
wizardBytes, err := os.ReadFile("./apc9138a.apc-wizard.p15")
if err != nil {
panic(err)
}
wizHeader := wizardBytes[:228]
log.Println(apcHeader)
log.Println(wizHeader)
for i := range wizHeader {
if apcHeader[i] != wizHeader[i] {
panic(i)
}
}
log.Println("match")
}