move some potentially blocking operations out of session pool workers, minor cleanup

This commit is contained in:
Arceliar
2019-08-04 16:29:58 -05:00
parent c55d7b4705
commit 979c3d4c07
2 changed files with 8 additions and 7 deletions

View File

@@ -172,7 +172,6 @@ func BoxOpen(shared *BoxSharedKey,
boxed []byte,
nonce *BoxNonce) ([]byte, bool) {
out := util.GetBytes()
//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 +184,6 @@ 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
s := (*[BoxSharedKeyLen]byte)(shared)
n := (*[BoxNonceLen]byte)(nonce)
boxed := box.SealAfterPrecomputation(out, unboxed, n, s)