| 202 | } |
| 203 | |
| 204 | std::string ToBase64Standard (std::string_view in) |
| 205 | { |
| 206 | auto str = ByteStreamToBase64 ((const uint8_t *)in.data (), in.length ()); |
| 207 | // replace '-' by '+' and '~' by '/' |
| 208 | for (auto& ch: str) |
| 209 | if (ch == '-') |
| 210 | ch = '+'; |
| 211 | else if (ch == '~') |
| 212 | ch = '/'; |
| 213 | return str; |
| 214 | } |
| 215 | |
| 216 | /* |
| 217 | * |
no test coverage detected