jython base64.urlsafe_b64xxx

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • py

    #1

    jython base64.urlsafe_b64xxx

    anyone know how to do perform the equivalent base64.urlsafe_ b64encode
    and base64.urlsafe_ b64decode functions that Python has but in jython?
    Jython comes with a base64 module but it does not have the urlsafe
    functions. Tried copying the pythhon base64.py to replace the Jython
    one, and although it did perform the encode/decode it didnt seem to be
    correctly decoded.


    thanks

  • Alan Kennedy

    #2
    Re: jython base64.urlsafe_ b64xxx

    py wrote:[color=blue]
    > anyone know how to do perform the equivalent base64.urlsafe_ b64encode
    > and base64.urlsafe_ b64decode functions that Python has but in jython?
    > Jython comes with a base64 module but it does not have the urlsafe
    > functions. Tried copying the pythhon base64.py to replace the Jython
    > one, and although it did perform the encode/decode it didnt seem to be
    > correctly decoded.[/color]

    You're probably better off using a java library for the task. There are
    plenty to choose from, but most embedded as utility classes in bigger
    packages. Here's a public domain one for example



    With javadoc at



    Seems to do what you want.

    HTH,

    --
    alan kennedy
    ------------------------------------------------------
    email alan: http://xhaus.com/contact/alan

    Comment

    Working...