func testEncBulk(t *testing.T, kIdx int, cipher block.Cipher, cipherTexts [][][]byte) { result := make([]byte, 8) for j, plain := range plainTextBlocks { cipher.Encrypt(result, plain) if 1 != subtle.ConstantTimeCompare(result, cipherTexts[j][kIdx]) { t.Errorf("? DES #%d encryption failed with plaintext #%d", j, kIdx) } } }