This commit is contained in:
jdl
2025-08-26 15:33:27 +02:00
parent d558ebbd14
commit ab246b2a90
28 changed files with 1093 additions and 447 deletions

View File

@@ -40,7 +40,7 @@ func TestControlCipher(t *testing.T) {
}
for _, plaintext := range testCases {
h1 := header{
h1 := Header{
StreamID: controlStreamID,
Counter: 235153,
SourceIP: 4,
@@ -51,7 +51,7 @@ func TestControlCipher(t *testing.T) {
encrypted = c1.Encrypt(h1, plaintext, encrypted)
h2 := header{}
h2 := Header{}
h2.Parse(encrypted)
if !reflect.DeepEqual(h1, h2) {
t.Fatal(h1, h2)
@@ -80,7 +80,7 @@ func TestControlCipher_ShortCiphertext(t *testing.T) {
func BenchmarkControlCipher_Encrypt(b *testing.B) {
c1, _ := newControlCipherForTesting()
h1 := header{
h1 := Header{
Counter: 235153,
SourceIP: 4,
DestIP: 88,
@@ -100,7 +100,7 @@ func BenchmarkControlCipher_Encrypt(b *testing.B) {
func BenchmarkControlCipher_Decrypt(b *testing.B) {
c1, c2 := newControlCipherForTesting()
h1 := header{
h1 := Header{
Counter: 235153,
SourceIP: 4,
DestIP: 88,