Method
Base64ToBase64Url
(String base64, boolean stripPadding)
Source from the content-addressed store, hash-verified
| 77 | } |
| 78 | |
| 79 | public static String Base64ToBase64Url(String base64, boolean stripPadding) { |
| 80 | String base64Url = base64.replace('+', '-').replace('/', '_'); |
| 81 | if (stripPadding) base64Url = trimRight(base64Url, '='); |
| 82 | return base64Url; |
| 83 | } |
| 84 | |
| 85 | private static String trimRight(String s, char ch) { |
| 86 | int i = s.length(); |
Callers
nothing calls this directly
Tested by
no test coverage detected