Fixed crash if encryption buffer is null