From: Brian Candler Date: 2010-08-18T23:15:57+09:00 Subject: Re: Base64 multiple by 4 Also, I tried to run the code you posted with the decode test vector, but it fails because encoding_characters is not defined. If all you're doing is base64 with some obfuscated character set, then String#tr may do what you want. >> str = "foobar" => "foobar" >> str.tr("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", "V8yOtbKFR4mIDuwEzP7Mv/TLQSe+qC6aHkolZ50dG2jAUpWxh1J3N9YsBiXrcgfn") => "aGG+eA" -- Posted via http://www.ruby-forum.com/.