By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,918 Members | 1,912 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,918 IT Pros & Developers. It's quick & easy.

jython base64.urlsafe_b64xxx

P: n/a
py
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

Jan 12 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.cg...ase64.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
Jan 13 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.