In these cases + and / are replaced by - and _ to prevent problems when using
the base64 strings in URLs.
Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Sage Weil <sage@inktank.com>
return c - 'a' + 26;
if (c >= '0' && c <= '9')
return c - '0' + 52;
- if (c == '+')
+ if (c == '+' || c == '-')
return 62;
- if (c == '/')
+ if (c == '/' || c == '_')
return 63;
if (c == '=')
return 0; /* just non-negative, please */