[Go][#SM4] Potentially malformed test cases

Hey @abdullahsweesi11, I can confirm that the hex string is missing the size field:

That said, I’m not entirely sure the hex string itself is valid, so I re-ran your code with debug: true.

You’ll notice that two 0a bytes are missing from the hex output.

The bug is caused by bufio.Scanner, which is designed to read text files line by line, and it automatically strips line endings (\n or 0a).

To avoid this issue, you’ll want to read raw bytes instead of strings.