func TestDecrypt(t *testing.T) { key := make([]byte, 16) rand.Read(key) constr1 := saes.Construction{Key: key} constr2 := Construction{Key: Expand(key)} in, out := make([]byte, 16), make([]byte, 16) rand.Read(in) constr1.Decrypt(out, in) if !constr2.decrypt(Expand(in)).Equals(Expand(out)) { t.Fatal("BES Decrypt didn't agree with AES Decrypt!") } }