4

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 ?

1 Answer 1

5

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.