Reputation:
I have been able to do base64 binary encode using iterators like
base64_from_binary<transform_width<const char *, 6, 8>>
but I would like to do it a URL friendly format, like here: http://en.wikipedia.org/wiki/Base64#URL_applications
by replacing '+' and '/' with '_' and '-' and having no == padding.
Is there a boost way of doing this, without having to do a replace on '+' and '/' and by having to calculate the length in a way that no == padding is used ?
Upvotes: 4
Views: 5732
Reputation:
Seems that using boost to do base64 transformations in the first place is a bad idea! This is actually a internal part of boost serialization.
So I reverted to using a external lib, now I have complete control on the characters used to do the encoding.
http://libb64.sourceforge.net/
http://www.adp-gmbh.ch/cpp/common/base64.html
Upvotes: 5