Choose the wrapper
Hex is the default. Switch explicitly to PEM or Base64 for textual wrappers; a local DER file is read as bytes. This avoids mistaking hex that also happens to be valid Base64.
- A PEM input must contain exactly one matching BEGIN and END block.