A normal == may stop at the first different byte, which can leak information through timing. In Go use subtle.ConstantTimeCompare.
Constant-time comparison
Comparing secrets in a way whose running time does not depend on where they first differ.
A normal == may stop at the first different byte, which can leak information through timing. In Go use subtle.ConstantTimeCompare.