| 标准 | RFC 4648 §4 |
|---|---|
| 字符集 | A-Z a-z 0-9 + /(= 为填充) |
| 膨胀比 | 约 4/3(33%) |
| 典型用途 | PEM 证书、邮件附件、JSON 内嵌二进制 |
编码与解码
编码与解码
echo -n 'hello' | base64 # aGVsbG8=
echo 'aGVsbG8=' | base64 -d
openssl base64 -in cert.der -out cert.b64Base64 是编码不是加密:任何人都能解码,不能用于保护敏感数据。