<div class="gmail_quote">On Tue, Feb 9, 2010 at 1:20 PM, Sven C. Koehler <span dir="ltr">&lt;<a href="mailto:schween@snafu.de">schween@snafu.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hey,<br>
<br>
I am using the http user id module and have not yet figured out how I can<br>
read the base64 encoded cookie from Ruby.  It seems like nginx uses a<br>
different form of base64 than Ruby does...<br>
<br>
Example:<br>
| uid value = E2F32BD0F154704B0C176D1D02050303<br>
<br>
In Ruby I see the cookie encoded like this:<br>
<br>
| {&quot;uid&quot;=&gt;&quot;0Cvz4ktwVPEdbRcMAwMFAg==&quot;}<br>
When I try to decode this value with Base64 in Ruby I get:<br>
<br></blockquote><div><br></div><div>Hi, Don&#39;t know the details, but the E2F3... thing is not base64. It looks more like hex encoding (should read as E2 F3 2B).. see ruby&#39;s String#unpack to munge it.</div><div><br>
</div><div><br></div></div>