client-interface-cleanup (#6)

Refactoring and code cleanup. Improved client command interface.
This commit is contained in:
2025-09-17 08:00:12 +00:00
parent 75c7c2d3d9
commit 3d93c0206c
14 changed files with 349 additions and 63 deletions

View File

@@ -1,7 +1,6 @@
package peer
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"crypto/rand"
@@ -39,10 +38,6 @@ func (sc *dataCipher) Key() [32]byte {
return sc.key
}
func (sc *dataCipher) HasKey(k [32]byte) bool {
return bytes.Equal(k[:], sc.key[:])
}
func (sc *dataCipher) Encrypt(h Header, data, out []byte) []byte {
const s = dataHeaderSize
out = out[:s+dataCipherOverhead+len(data)]