mirror of
https://github.com/fumiama/WireGold.git
synced 2026-07-01 00:00:23 +08:00
fix(listen): allow nil body packets
This commit is contained in:
@@ -45,7 +45,11 @@ func TestXChacha20(t *testing.T) {
|
||||
}
|
||||
data := []byte("12345678")
|
||||
for i := uint64(0); i < 100000; i++ {
|
||||
if !bytes.Equal(decode(aead, uint16(i), encode(aead, uint16(i), data)), data) {
|
||||
db, err := decode(aead, uint16(i), encode(aead, uint16(i), data))
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !bytes.Equal(db, data) {
|
||||
t.Fatal("unexpected preshared at", i, "addt", uint16(i))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user