[CXF-5869] Temporary file caching using encryption may get corrupted data