jython base64.urlsafe_b64xxx

Alan Kennedy alanmk at hotmail.com
Fri Jan 13 16:25:44 EST 2006


py wrote:
> 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.

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

http://dev.i2p.net/cgi-bin/cvsweb.cgi/i2p/core/java/src/net/i2p/data/Base64.java?f=H

With javadoc at

http://dev.i2p.net/javadoc/net/i2p/data/Base64.html

Seems to do what you want.

HTH,

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



More information about the Python-list mailing list