<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 5/11/17 7:23 PM, Tom Scavo wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAEtu=dMH2ayF_WgvK5o+yEc25EhPiiA7S1mjynKHR33O31ghyQ@mail.gmail.com">
      <pre wrap="">On Thu, May 11, 2017 at 7:00 PM, Brent Putman <a class="moz-txt-link-rfc2396E" href="mailto:putmanb@georgetown.edu"><putmanb@georgetown.edu></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">
However as they mention in JWS [1], it's trivial to implement base64url in
terms of using existing base64 routines + a bit of search/replace.  So for
example a little wrapper script around the base64 cli tool would probably do
the trick.

[1] <a class="moz-txt-link-freetext" href="https://tools.ietf.org/html/rfc7515#appendix-C">https://tools.ietf.org/html/rfc7515#appendix-C</a>
</pre>
      </blockquote>
      <pre wrap="">
Are you suggesting the following:

1. Apply base64
2. Translate '/' and '+' characters</pre>
    </blockquote>
    Dont't forget:<br>
    <br>
    3. Strip trailing '='. <br>
    <br>
    That's for encoding.<br>
    <br>
    Decoding is just the reverse order.  Have to do a little modular
    arithmetic to add the appropriate number of '=' padding at the end.<br>
    <br>
    <blockquote type="cite"
cite="mid:CAEtu=dMH2ayF_WgvK5o+yEc25EhPiiA7S1mjynKHR33O31ghyQ@mail.gmail.com">
      <pre wrap="">

The latter could be done with the tr command, I suppose.</pre>
    </blockquote>
    <br>
    Or perl, sed, or other things that can act as unix cmdline filters. 
    Or wrap the whole base64 call with perl, python, etc.<br>
    <br>
  </body>
</html>