compute memory requirement for PEM-encoding correctly