From: Emiel van de Laar Date: 2002-12-10T05:37:35+09:00 Subject: Re: Ruby base64 encoding/decoding * Michael Neumann (520079130762-0001@t-online.de) wrote: > On Mon, 2002-12-09 at 21:22, Emiel van de Laar wrote: > > Fellow Ruby users, > > > > I'm looking for a Ruby module that handles base64 encoding/decoding. RAA > > doesn't seem to carry one. Perhaps it doesn't exist and someone with > > some spare time could port the PERL version. :) In my opinion this is > > a fundamental module the Ruby community is missing at the moment. > > See String#unpack and Array#pack. > > s = [binaryString].pack("m") # encodes binaryString as base64 > s.unpack("m") # decodes s Wow it comes standard with Ruby. Nice. Thanks for pointing me in the right direction. ;) Emiel -- E F van de Laar Beheers Commissaris dispuut Interlink +31648183479 www.il.fontys.nl/~emiel