func main()

in scripts/go/main.go [23:54]


func main() {
	content, err := ioutil.ReadFile("cases.json")
	if err != nil {
	   log.Fatal(err)
	}
	caseString := string(content)

	var cases []Case

	json.Unmarshal([]byte(caseString), &cases)
	//fmt.Printf("Cases : %+v", cases)

	fmt.Printf("\n|Go             |")
	for i, c := range cases {
		pk_bytes, _ := hex.DecodeString(c.Pub_Key)
		m_bytes, _ := hex.DecodeString(c.Message)
		sig_bytes, _ := hex.DecodeString(c.Signature)

		pk := ed25519.PublicKey(pk_bytes)

		ver := ed25519.Verify(pk, m_bytes, sig_bytes)

		if ver {
				fmt.Printf(" V |")
		} else {
				fmt.Printf(" X |")
		}
		_ = i
	}
	fmt.Printf("\n")

}