Perl and Python's base64 functions both follow the "put a new line after the
76th character" convention.
It's unintuitive that php doesn't. Oh well.
--
base64_encode produces invalidly encoded string
https://launchpad.net/bugs/54140
--
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https
But that's for MIME data -- base64 encoding can be used for other
purposes too. PHP makes that possible by not requiring splits, but
making them possible very easy.
--
base64_encode produces invalidly encoded string
https://launchpad.net/bugs/54140
--
ubuntu-bugs mailing list
ubuntu-bugs@lists.u
True, but is it wrong?
RFC 2045 seems to be the closest thing to a specification, and it mentions:
"The 76 character limit does not count the trailing CRLF, but counts all other
characters, including any equal signs."
--
base64_encode produces invalidly encoded string
https://launchpad.net/bugs/
wikipedia isn't a specification :)
--
base64_encode produces invalidly encoded string
https://launchpad.net/bugs/54140
--
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Are you sure?
"newlines are inserted in the encoded data every 76 characters, the actual
length of the encoded data is approximately 135.1% of the original.
[..]
For example[..]:
TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlz
IHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhb