xorlayer

command
v0.0.0-...-44d96ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Xorlayer shows a uio layer stack with a plain TCP peer that does the same XOR by hand, so what each layer does is visible from both ends of the wire:

     plain client                      server (uio)
net.Dial, XOR by hand     handler: reads "hello", echoes it
       │                                  ▲
       │                   layer 2 xor: ciphertext ⇄ plaintext
       │                                  ▲
       │                 layer 1 wiretap: prints every byte
       │                                  ▲
       └────────────── wire ──────────────┘ socket

The first layer installed sits next to the socket, so the wiretap prints what actually crosses the wire — the XOR'd bytes — while the handler above the xor layer reads and writes plaintext. The echo travels back through both layers in reverse. A uio client installs the same stack with uio.WithLayers on its Dial; this example uses a plain peer so the wire is visible on both sides.

Run it:

go run ./xorlayer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL