Optimised use of buffers when decrypting to avoid unnecessary array copying