disable crypto and switch buffer changes from testing

This commit is contained in:
Arceliar 2019-08-04 15:25:14 -05:00
parent 0ba8c6a34f
commit 07f14f92ed
2 changed files with 3 additions and 3 deletions

View File

@ -172,7 +172,7 @@ func BoxOpen(shared *BoxSharedKey,
boxed []byte,
nonce *BoxNonce) ([]byte, bool) {
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)
n := (*[BoxNonceLen]byte)(nonce)
unboxed, success := box.OpenAfterPrecomputation(out, boxed, n, s)
@ -185,7 +185,7 @@ func BoxSeal(shared *BoxSharedKey, unboxed []byte, nonce *BoxNonce) ([]byte, *Bo
}
nonce.Increment()
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)
n := (*[BoxNonceLen]byte)(nonce)
boxed := box.SealAfterPrecomputation(out, unboxed, n, s)

View File

@ -820,7 +820,7 @@ func (t *switchTable) doWorker() {
select {
case bs := <-t.toRouter:
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])
buf = buf[1:]
}