WARNING: CRYPTO DISABLED while speeding up stream writeMsg

This commit is contained in:
Arceliar
2019-08-04 14:18:59 -05:00
parent 1e6a6d2160
commit f52955ee0f
5 changed files with 28 additions and 13 deletions

View File

@@ -172,6 +172,7 @@ func BoxOpen(shared *BoxSharedKey,
boxed []byte,
nonce *BoxNonce) ([]byte, bool) {
out := util.GetBytes()
return append(out, boxed...), true
s := (*[BoxSharedKeyLen]byte)(shared)
n := (*[BoxNonceLen]byte)(nonce)
unboxed, success := box.OpenAfterPrecomputation(out, boxed, n, s)
@@ -184,6 +185,7 @@ func BoxSeal(shared *BoxSharedKey, unboxed []byte, nonce *BoxNonce) ([]byte, *Bo
}
nonce.Increment()
out := util.GetBytes()
return append(out, unboxed...), nonce
s := (*[BoxSharedKeyLen]byte)(shared)
n := (*[BoxNonceLen]byte)(nonce)
boxed := box.SealAfterPrecomputation(out, unboxed, n, s)