mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 23:41:35 +00:00
disable crypto and switch buffer changes from testing
This commit is contained in:
parent
0ba8c6a34f
commit
07f14f92ed
@ -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…
Reference in New Issue
Block a user