bxor

Chris Pressey <>
Thu Feb 20 23:08:57 CET 2003


On Thu, 20 Feb 2003 15:44:16 -0500
Dan Melomedman <> wrote:

> Martin Bjorklund wrote:
> > Dan Melomedman <> wrote:
> > > Thanks all for great examples. I am trying to write a RADIUS client.
> > > It needs to XOR an MD5 digest (128 bit binary) with an arbitrary
> > > long user password. I'll try a few things, and see what works
> > > better. Thanks.
> > 
> > Here's another example, which may be of use to you :)
> 
> This one hits the spot! Thanks! Erlang is an amazing language.
> 
> Note: I am new to Erlang. Shouldn't there be a more concise way to
> define xor16? What if B could be of arbitrary length in some other
> protocol?

Hi,
I believe that version is optimized for performance given certain
assumptions.  My suggestion would be to write your version to be as simple
as possible at first, then optimize it if it becomes necessary.

-Chris



More information about the erlang-questions mailing list