mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
disable crypto and switch buffer changes from testing
This commit is contained in:
parent
0ba8c6a34f
commit
07f14f92ed
2 changed files with 3 additions and 3 deletions
|
@ -172,7 +172,7 @@ func BoxOpen(shared *BoxSharedKey,
|
||||||
boxed []byte,
|
boxed []byte,
|
||||||
nonce *BoxNonce) ([]byte, bool) {
|
nonce *BoxNonce) ([]byte, bool) {
|
||||||
out := util.GetBytes()
|
out := util.GetBytes()
|
||||||
return append(out, boxed...), true //FIXME disabled crypto for benchmarking
|
//return append(out, boxed...), true //FIXME disabled crypto for benchmarking
|
||||||
s := (*[BoxSharedKeyLen]byte)(shared)
|
s := (*[BoxSharedKeyLen]byte)(shared)
|
||||||
n := (*[BoxNonceLen]byte)(nonce)
|
n := (*[BoxNonceLen]byte)(nonce)
|
||||||
unboxed, success := box.OpenAfterPrecomputation(out, boxed, n, s)
|
unboxed, success := box.OpenAfterPrecomputation(out, boxed, n, s)
|
||||||
|
@ -185,7 +185,7 @@ func BoxSeal(shared *BoxSharedKey, unboxed []byte, nonce *BoxNonce) ([]byte, *Bo
|
||||||
}
|
}
|
||||||
nonce.Increment()
|
nonce.Increment()
|
||||||
out := util.GetBytes()
|
out := util.GetBytes()
|
||||||
return append(out, unboxed...), nonce // FIXME disabled crypto for benchmarking
|
//return append(out, unboxed...), nonce // FIXME disabled crypto for benchmarking
|
||||||
s := (*[BoxSharedKeyLen]byte)(shared)
|
s := (*[BoxSharedKeyLen]byte)(shared)
|
||||||
n := (*[BoxNonceLen]byte)(nonce)
|
n := (*[BoxNonceLen]byte)(nonce)
|
||||||
boxed := box.SealAfterPrecomputation(out, unboxed, n, s)
|
boxed := box.SealAfterPrecomputation(out, unboxed, n, s)
|
||||||
|
|
|
@ -820,7 +820,7 @@ func (t *switchTable) doWorker() {
|
||||||
select {
|
select {
|
||||||
case bs := <-t.toRouter:
|
case bs := <-t.toRouter:
|
||||||
buf = append(buf, bs)
|
buf = append(buf, bs)
|
||||||
for len(buf) > 32768 { // FIXME realistically don't drop anything, just for testing
|
for len(buf) > 32 {
|
||||||
util.PutBytes(buf[0])
|
util.PutBytes(buf[0])
|
||||||
buf = buf[1:]
|
buf = buf[1:]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue