Lines Matching refs:tt
218 for i, tt := range keyTests {
219 enc := make([]uint32, len(tt.enc))
221 if tt.dec != nil {
222 dec = make([]uint32, len(tt.dec))
227 expandKeyGo(tt.key, enc, dec)
229 if v != tt.enc[j] {
230 t.Errorf("key %d: enc[%d] = %#x, want %#x", i, j, v, tt.enc[j])
236 if v != tt.dec[j] {
237 t.Errorf("key %d: dec[%d] = %#x, want %#x", i, j, v, tt.dec[j])
285 for i, tt := range encryptTests {
286 c, err := NewCipher(tt.key)
288 t.Errorf("NewCipher(%d bytes) = %s", len(tt.key), err)
291 out := make([]byte, len(tt.in))
292 c.Encrypt(out, tt.in)
294 if v != tt.out[j] {
295 t.Errorf("Cipher.Encrypt %d: out[%d] = %#x, want %#x", i, j, v, tt.out[j])
304 for i, tt := range encryptTests {
305 c, err := NewCipher(tt.key)
307 t.Errorf("NewCipher(%d bytes) = %s", len(tt.key), err)
310 plain := make([]byte, len(tt.in))
311 c.Decrypt(plain, tt.out)
313 if v != tt.in[j] {
314 t.Errorf("decryptBlock %d: plain[%d] = %#x, want %#x", i, j, v, tt.in[j])
350 tt := encryptTests[0]
351 c, err := NewCipher(tt.key)
355 out := make([]byte, len(tt.in))
359 c.Encrypt(out, tt.in)
364 tt := encryptTests[0]
365 c, err := NewCipher(tt.key)
369 out := make([]byte, len(tt.out))
373 c.Decrypt(out, tt.out)
378 tt := encryptTests[0]
379 n := len(tt.key) + 28
383 expandKey(tt.key, c.enc, c.dec)