On Oct 9, 12:56 pm, Ray Miller <r...@1729.org.uk> wrote:
> On 6 October 2011 19:38, Ray Miller <r...@1729.org.uk> wrote:
> > Incidentally, I used the Apache Commons Base64 encoder, as the one in
> > contrib was producing different results from the Apache Commons and
> > Perl implementations. Perhaps a bug?
>
> ...
> This string differs in several positions (first at character 3). Any
> idea what's going wrong?

That does look like a bug. On closer look base64/encode does not
handle
negative bytes properly (java has only unsigned bytes and bitwise
operations on byte arrays always cause grief).

I have a fix in https://github.com/anttipoi/clojure-contrib if anyone
is interested. I do have the CA sent in, so you're welcome to pull,
if that is appropriate.

As discussed elsewhere, the base64 module is not very efficient and
is not currently planned to be migrated to a new style contrib module.
Maybe using commons-codec is the best alternative for you?

Yours,
Teemu Antti-Poika

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to