Correct buffer size for encryption EOF handling