wip
This commit is contained in:
parent
302d27692b
commit
1ca55158c2
@ -1 +0,0 @@
|
|||||||
package peer
|
|
@ -1,13 +0,0 @@
|
|||||||
package peer
|
|
||||||
|
|
||||||
/*
|
|
||||||
func signData(privKey *[64]byte, h header, data, out []byte) []byte {
|
|
||||||
out = out[:headerSize]
|
|
||||||
h.Marshal(out)
|
|
||||||
return sign.Sign(out, data, privKey)
|
|
||||||
}
|
|
||||||
|
|
||||||
func openData(pubKey *[32]byte, signed, out []byte) (data []byte, ok bool) {
|
|
||||||
return sign.Open(out[:0], signed[headerSize:], pubKey)
|
|
||||||
}
|
|
||||||
*/
|
|
@ -1 +0,0 @@
|
|||||||
package peer
|
|
@ -9,9 +9,7 @@ import (
|
|||||||
|
|
||||||
func TestSynPacket(t *testing.T) {
|
func TestSynPacket(t *testing.T) {
|
||||||
p := packetSyn{
|
p := packetSyn{
|
||||||
TraceID: newTraceID(),
|
TraceID: 2342342345,
|
||||||
//SentAt: time.Now().UnixMilli(),
|
|
||||||
//SharedKeyType: 1,
|
|
||||||
Direct: true,
|
Direct: true,
|
||||||
}
|
}
|
||||||
rand.Read(p.SharedKey[:])
|
rand.Read(p.SharedKey[:])
|
||||||
@ -32,7 +30,7 @@ func TestSynPacket(t *testing.T) {
|
|||||||
|
|
||||||
func TestAckPacket(t *testing.T) {
|
func TestAckPacket(t *testing.T) {
|
||||||
p := packetAck{
|
p := packetAck{
|
||||||
TraceID: newTraceID(),
|
TraceID: 123213,
|
||||||
ToAddr: netip.AddrPortFrom(netip.AddrFrom4([4]byte{1, 2, 3, 4}), 234),
|
ToAddr: netip.AddrPortFrom(netip.AddrFrom4([4]byte{1, 2, 3, 4}), 234),
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +50,7 @@ func TestAckPacket(t *testing.T) {
|
|||||||
|
|
||||||
func TestProbePacket(t *testing.T) {
|
func TestProbePacket(t *testing.T) {
|
||||||
p := packetProbe{
|
p := packetProbe{
|
||||||
TraceID: newTraceID(),
|
TraceID: 12345,
|
||||||
}
|
}
|
||||||
|
|
||||||
buf := p.Marshal(newBuf())
|
buf := p.Marshal(newBuf())
|
||||||
|
@ -1 +0,0 @@
|
|||||||
package peer
|
|
@ -1 +0,0 @@
|
|||||||
package peer
|
|
@ -1 +0,0 @@
|
|||||||
package peer
|
|
Loading…
x
Reference in New Issue
Block a user