- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestConstantTimeByteEq (0.17 sec)
-
src/crypto/subtle/constant_time_test.go
{0, 0, 1}, {0, 1, 0}, {1, 0, 0}, {0xff, 0xff, 1}, {0xff, 0xfe, 0}, } func byteEq(a, b uint8) int { if a == b { return 1 } return 0 } func TestConstantTimeByteEq(t *testing.T) { for i, test := range testConstandTimeByteEqData { if r := ConstantTimeByteEq(test.a, test.b); r != test.out { t.Errorf("#%d bad result (got %x, want %x)", i, r, test.out) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 10 03:47:57 UTC 2017 - 2.9K bytes - Viewed (0)