You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our current Cryptographer trait decrypts from a &[u8] and returns a Vec<u8>, for simplicity. This means that each decryption operation must allocate a new Vec to hold the result, and then we copy the bytes out of that temporary Vec and into the final output Vec.
We could reduce the amount of allocation and copying going on here if our Cryptographer trait instead accepted an output buffer as argument and decrypted into it. That's actually out the existing openssl backend works under the hood already, we just wrap it in automatic creation of the Vec.
Not urgent, but could be a nice little improvement.
The text was updated successfully, but these errors were encountered:
Our current
Cryptographer
trait decrypts from a&[u8]
and returns aVec<u8>
, for simplicity. This means that each decryption operation must allocate a newVec
to hold the result, and then we copy the bytes out of that temporaryVec
and into the final outputVec
.We could reduce the amount of allocation and copying going on here if our
Cryptographer
trait instead accepted an output buffer as argument and decrypted into it. That's actually out the existing openssl backend works under the hood already, we just wrap it in automatic creation of theVec
.Not urgent, but could be a nice little improvement.
The text was updated successfully, but these errors were encountered: