aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/a02827.html
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
committerneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
commit0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch)
tree2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/a02827.html
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to '')
-rw-r--r--docs/doxygen/nel/a02827.html770
1 files changed, 770 insertions, 0 deletions
diff --git a/docs/doxygen/nel/a02827.html b/docs/doxygen/nel/a02827.html
new file mode 100644
index 00000000..7d97e549
--- /dev/null
+++ b/docs/doxygen/nel/a02827.html
@@ -0,0 +1,770 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>NeL: NLNET::CLoginCookie class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.3.6 -->
+<div class="qindex"> <form class="search" action="search.php" method="get">
+<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a> | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
+<h1>NLNET::CLoginCookie Class Reference</h1><code>#include &lt;<a class="el" href="a05961.html">login_cookie.h</a>&gt;</code>
+<p>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Manage cookie during the authenticate procedure.<p>
+_UserAddr is the ipv4 address of the client in uint32 _UserKey is an uint32 generated by the login_service at each login password verification _UserId is an uint32 uniq for each account (an account could have more than one avatar)<p>
+<dl compact><dt><b>Author:</b></dt><dd>Vianney Lecroart <p>
+Nevrax France </dd></dl>
+<dl compact><dt><b>Date:</b></dt><dd>2001 </dd></dl>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05961.html#l00049">49</a> of file <a class="el" href="a05961.html">login_cookie.h</a>.<table border=0 cellpadding=0 cellspacing=0>
+<tr><td></td></tr>
+<tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookiea0">clear</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookiea1">CLoginCookie</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookiea2">CLoginCookie</a> (<a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a04223.html#a657">addr</a>, <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a04223.html#a564">id</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookiea3">generateKey</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookiea4">getUserAddr</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookiea5">getUserId</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookiea6">getUserKey</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookiea7">isValid</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookiea8">serial</a> (<a class="el" href="a02270.html">NLMISC::IStream</a> &amp;<a class="el" href="a04223.html#a626">s</a>)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookiea9">set</a> (<a class="el" href="a04558.html#a11">uint32</a> ua, <a class="el" href="a04558.html#a11">uint32</a> uk, <a class="el" href="a04558.html#a11">uint32</a> ui)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookiea10">setFromString</a> (const std::string &amp;str)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookiea11">setToString</a> ()</td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>std::string&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookiea12">toString</a> () const </td></tr>
+
+<tr><td colspan=2><br><h2>Private Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookier0">_UserAddr</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookier1">_UserId</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookier2">_UserKey</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookier3">_Valid</a></td></tr>
+
+<tr><td colspan=2><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align=right valign=top>bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="a02827.html#NLNET_1_1CLoginCookien0">operator==</a> (const <a class="el" href="a02827.html">CLoginCookie</a> &amp;c1, const <a class="el" href="a02827.html">CLoginCookie</a> &amp;c2)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Comparison == operator. <a href="#NLNET_1_1CLoginCookien0"></a><br><br></td></tr>
+</table>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="NLNET_1_1CLoginCookiea2" doxytag="NLNET::CLoginCookie::CLoginCookie" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> NLNET::CLoginCookie::CLoginCookie </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>addr</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>id</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05960.html#l00047">47</a> of file <a class="el" href="a05960.html">login_cookie.cpp</a>.
+<p>
+References <a class="el" href="a05961.html#l00122">_UserKey</a>, <a class="el" href="a05646.html#l01127">addr</a>, <a class="el" href="a05960.html#l00055">generateKey()</a>, <a class="el" href="a05646.html#l00221">id</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+<div class="fragment"><pre>00047 : <a class="code" href="a02827.html#NLNET_1_1CLoginCookier3">_Valid</a>(<span class="keyword">true</span>), <a class="code" href="a02827.html#NLNET_1_1CLoginCookier0">_UserAddr</a>(addr), <a class="code" href="a02827.html#NLNET_1_1CLoginCookier1">_UserId</a>(<span class="keywordtype">id</span>)
+00048 {
+00049 <span class="comment">// generates the key for this cookie</span>
+00050 <a class="code" href="a02827.html#NLNET_1_1CLoginCookier2">_UserKey</a> = <a class="code" href="a02827.html#NLNET_1_1CLoginCookiea3">generateKey</a>();
+00051 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CLoginCookiea1" doxytag="NLNET::CLoginCookie::CLoginCookie" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> NLNET::CLoginCookie::CLoginCookie </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05961.html#l00054">54</a> of file <a class="el" href="a05961.html">login_cookie.h</a>.
+<p>
+<div class="fragment"><pre>00054 : <a class="code" href="a02827.html#NLNET_1_1CLoginCookier3">_Valid</a>(<span class="keyword">false</span>) { }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="NLNET_1_1CLoginCookiea0" doxytag="NLNET::CLoginCookie::clear" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLNET::CLoginCookie::clear </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">void&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05961.html#l00110">110</a> of file <a class="el" href="a05961.html">login_cookie.h</a>.
+<p>
+<div class="fragment"><pre>00110 { <a class="code" href="a02827.html#NLNET_1_1CLoginCookier3">_Valid</a> = <span class="keyword">false</span>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CLoginCookiea3" doxytag="NLNET::CLoginCookie::generateKey" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> NLNET::CLoginCookie::generateKey </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+<dl compact><dt><b><a class="el" href="todo.html#_todo000035">Todo:</a></b></dt><dd>ace: is the cookie enough to avoid hackers to predice keys?</dd></dl>
+
+<p>
+Definition at line <a class="el" href="a05960.html#l00055">55</a> of file <a class="el" href="a05960.html">login_cookie.cpp</a>.
+<p>
+References <a class="el" href="a05646.html#l00993">r</a>, <a class="el" href="a05646.html#l00985">t</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+Referenced by <a class="el" href="a05960.html#l00047">CLoginCookie()</a>.
+<p>
+<div class="fragment"><pre>00056 {
+00057 <a class="code" href="a04558.html#a11">uint32</a> <a class="code" href="a04223.html#a627">t</a> = time (NULL);
+00058 srand (time(NULL));
+00059 <a class="code" href="a04558.html#a11">uint32</a> <a class="code" href="a04223.html#a628">r</a> = rand ();
+00060 <span class="keyword">static</span> <a class="code" href="a04558.html#a11">uint32</a> n = 0;
+00061 n++;
+00062
+00063 <span class="comment">// 12bits for the time (in second) =&gt; loop in 1 hour</span>
+00064 <span class="comment">// 8bits for random =&gt; 256 case</span>
+00065 <span class="comment">// 12bits for the inc number =&gt; can generate 4096 keys per second without any problem (if you generate more than this number, you could have 2 same keys)</span>
+00066 <span class="keywordflow">return</span> (<a class="code" href="a04223.html#a627">t</a>&amp;0xFFF)&lt;&lt;20 | (<a class="code" href="a04223.html#a628">r</a>&amp;0xFF)&lt;&lt;12 | (n&amp;0xFFF);
+00067
+00068 <span class="comment">// 12bits for the time (in second) =&gt; loop in 1 hour</span>
+00069 <span class="comment">// 20bits for the inc number =&gt; can generate more than 1 million keys per second without any problem (never exceed on my computer)</span>
+00070 <span class="comment">// return (t&amp;0xFFF)&lt;&lt;20 | (n&amp;0xFFFFF);</span>
+00071 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CLoginCookiea4" doxytag="NLNET::CLoginCookie::getUserAddr" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> NLNET::CLoginCookie::getUserAddr </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05961.html#l00103">103</a> of file <a class="el" href="a05961.html">login_cookie.h</a>.
+<p>
+References <a class="el" href="a05961.html#l00121">_UserAddr</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+<div class="fragment"><pre>00103 { <a class="code" href="a04199.html#a6">nlassert</a> (_Valid); <span class="keywordflow">return</span> <a class="code" href="a02827.html#NLNET_1_1CLoginCookier0">_UserAddr</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CLoginCookiea5" doxytag="NLNET::CLoginCookie::getUserId" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> NLNET::CLoginCookie::getUserId </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05961.html#l00105">105</a> of file <a class="el" href="a05961.html">login_cookie.h</a>.
+<p>
+References <a class="el" href="a05961.html#l00123">_UserId</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+Referenced by <a class="el" href="a05962.html#l00181">NLNET::cbShardValidation()</a>.
+<p>
+<div class="fragment"><pre>00105 { <a class="code" href="a04199.html#a6">nlassert</a> (_Valid); <span class="keywordflow">return</span> <a class="code" href="a02827.html#NLNET_1_1CLoginCookier1">_UserId</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CLoginCookiea6" doxytag="NLNET::CLoginCookie::getUserKey" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> NLNET::CLoginCookie::getUserKey </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05961.html#l00104">104</a> of file <a class="el" href="a05961.html">login_cookie.h</a>.
+<p>
+References <a class="el" href="a05961.html#l00122">_UserKey</a>, <a class="el" href="a05622.html#l00290">nlassert</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+<div class="fragment"><pre>00104 { <a class="code" href="a04199.html#a6">nlassert</a> (_Valid); <span class="keywordflow">return</span> <a class="code" href="a02827.html#NLNET_1_1CLoginCookier2">_UserKey</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CLoginCookiea7" doxytag="NLNET::CLoginCookie::isValid" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> bool NLNET::CLoginCookie::isValid </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">void&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05961.html#l00109">109</a> of file <a class="el" href="a05961.html">login_cookie.h</a>.
+<p>
+<div class="fragment"><pre>00109 { <span class="keywordflow">return</span> <a class="code" href="a02827.html#NLNET_1_1CLoginCookier3">_Valid</a>; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CLoginCookiea8" doxytag="NLNET::CLoginCookie::serial" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLNET::CLoginCookie::serial </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a02270.html">NLMISC::IStream</a> &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>s</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05961.html#l00056">56</a> of file <a class="el" href="a05961.html">login_cookie.h</a>.
+<p>
+References <a class="el" href="a05961.html#l00121">_UserAddr</a>, <a class="el" href="a05961.html#l00123">_UserId</a>, <a class="el" href="a05961.html#l00122">_UserKey</a>, <a class="el" href="a05622.html#l00135">nlwarning</a>, and <a class="el" href="a05646.html#l00977">s</a>.
+<p>
+<div class="fragment"><pre>00057 {
+00058 <span class="comment">// verify that we initialized the cookie before writing it</span>
+00059 <span class="keywordflow">if</span> (!<a class="code" href="a04223.html#a626">s</a>.isReading() &amp;&amp; !<a class="code" href="a02827.html#NLNET_1_1CLoginCookier3">_Valid</a>) <a class="code" href="a04199.html#a2">nlwarning</a> (<span class="stringliteral">"LC: serialize a non valid cookie"</span>);
+00060
+00061 <a class="code" href="a04223.html#a626">s</a>.serial (_UserAddr);
+00062 <a class="code" href="a04223.html#a626">s</a>.serial (_UserKey);
+00063 <a class="code" href="a04223.html#a626">s</a>.serial (_UserId);
+00064
+00065 <span class="keywordflow">if</span> (<a class="code" href="a04223.html#a626">s</a>.isReading()) <a class="code" href="a02827.html#NLNET_1_1CLoginCookier3">_Valid</a> = <span class="keyword">true</span>;
+00066 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CLoginCookiea9" doxytag="NLNET::CLoginCookie::set" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLNET::CLoginCookie::set </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top"><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ua</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>uk</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap><a class="el" href="a04558.html#a11">uint32</a>&nbsp;</td>
+ <td class="mdname" nowrap> <em>ui</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05961.html#l00107">107</a> of file <a class="el" href="a05961.html">login_cookie.h</a>.
+<p>
+References <a class="el" href="a05961.html#l00121">_UserAddr</a>, <a class="el" href="a05961.html#l00123">_UserId</a>, <a class="el" href="a05961.html#l00122">_UserKey</a>, and <a class="el" href="a05981.html#l00100">uint32</a>.
+<p>
+Referenced by <a class="el" href="a05962.html#l00181">NLNET::cbShardValidation()</a>.
+<p>
+<div class="fragment"><pre>00107 { <a class="code" href="a02827.html#NLNET_1_1CLoginCookier3">_Valid</a> = <span class="keyword">true</span>; <a class="code" href="a02827.html#NLNET_1_1CLoginCookier0">_UserAddr</a> = ua; <a class="code" href="a02827.html#NLNET_1_1CLoginCookier2">_UserKey</a> = uk; <a class="code" href="a02827.html#NLNET_1_1CLoginCookier1">_UserId</a> = ui; }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CLoginCookiea10" doxytag="NLNET::CLoginCookie::setFromString" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> void NLNET::CLoginCookie::setFromString </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> <em>str</em> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05961.html#l00083">83</a> of file <a class="el" href="a05961.html">login_cookie.h</a>.
+<p>
+References <a class="el" href="a05961.html#l00121">_UserAddr</a>, <a class="el" href="a05961.html#l00123">_UserId</a>, <a class="el" href="a05961.html#l00122">_UserKey</a>, <a class="el" href="a05622.html#l00111">nlinfo</a>, and <a class="el" href="a05961.html#l00095">toString()</a>.
+<p>
+<div class="fragment"><pre>00084 {
+00085 sscanf(str.c_str(), <span class="stringliteral">"%08X|%08X|%08X"</span>, &amp;<a class="code" href="a02827.html#NLNET_1_1CLoginCookier0">_UserAddr</a>, &amp;<a class="code" href="a02827.html#NLNET_1_1CLoginCookier2">_UserKey</a>, &amp;<a class="code" href="a02827.html#NLNET_1_1CLoginCookier1">_UserId</a>);
+00086
+00087 <span class="keywordflow">if</span>(str.empty () || (<a class="code" href="a02827.html#NLNET_1_1CLoginCookier0">_UserAddr</a>==0 &amp;&amp; _UserKey==0 &amp;&amp; <a class="code" href="a02827.html#NLNET_1_1CLoginCookier1">_UserId</a>==0))
+00088 <a class="code" href="a02827.html#NLNET_1_1CLoginCookier3">_Valid</a> = 0;
+00089 <span class="keywordflow">else</span>
+00090 <a class="code" href="a02827.html#NLNET_1_1CLoginCookier3">_Valid</a> = 1;
+00091
+00092 <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"LC: setFromString %s -&gt; %s, isValid: %d"</span>, str.c_str (), <a class="code" href="a02827.html#NLNET_1_1CLoginCookiea12">toString</a>().c_str (), <a class="code" href="a02827.html#NLNET_1_1CLoginCookier3">_Valid</a>);
+00093 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CLoginCookiea11" doxytag="NLNET::CLoginCookie::setToString" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> std::string NLNET::CLoginCookie::setToString </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap><code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05961.html#l00068">68</a> of file <a class="el" href="a05961.html">login_cookie.h</a>.
+<p>
+References <a class="el" href="a05961.html#l00121">_UserAddr</a>, <a class="el" href="a05961.html#l00123">_UserId</a>, <a class="el" href="a05961.html#l00122">_UserKey</a>, <a class="el" href="a05622.html#l00111">nlinfo</a>, <a class="el" href="a05586.html#l00161">NLMISC::smprintf()</a>, and <a class="el" href="a05961.html#l00095">toString()</a>.
+<p>
+<div class="fragment"><pre>00069 {
+00070 <span class="keywordflow">if</span> (<a class="code" href="a02827.html#NLNET_1_1CLoginCookier3">_Valid</a>)
+00071 {
+00072 <span class="keywordtype">char</span> cstr[8*3+2+1];
+00073 <a class="code" href="a05378.html#a259">NLMISC::smprintf</a>(cstr, 8*3+2+1, <span class="stringliteral">"%08X|%08X|%08X"</span>, _UserAddr, _UserKey, _UserId);
+00074 <a class="code" href="a04199.html#a1">nlinfo</a> (<span class="stringliteral">"LC: setToString %s -&gt; %s"</span>, <a class="code" href="a02827.html#NLNET_1_1CLoginCookiea12">toString</a>().c_str (), cstr);
+00075 <span class="keywordflow">return</span> cstr;
+00076 }
+00077 <span class="keywordflow">else</span>
+00078 {
+00079 <span class="keywordflow">return</span> <span class="stringliteral">"0|0|0"</span>;
+00080 }
+00081 }
+</pre></div> </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CLoginCookiea12" doxytag="NLNET::CLoginCookie::toString" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> std::string NLNET::CLoginCookie::toString </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="mdname1" valign="top" nowrap> </td>
+ <td class="md" valign="top">&nbsp;)&nbsp;</td>
+ <td class="md" nowrap> const<code> [inline]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05961.html#l00095">95</a> of file <a class="el" href="a05961.html">login_cookie.h</a>.
+<p>
+References <a class="el" href="a05961.html#l00121">_UserAddr</a>, <a class="el" href="a05961.html#l00123">_UserId</a>, <a class="el" href="a05961.html#l00122">_UserKey</a>, and <a class="el" href="a06229.html#l02652">NLMISC::toString()</a>.
+<p>
+Referenced by <a class="el" href="a05962.html#l00181">NLNET::cbShardValidation()</a>, <a class="el" href="a05962.html#l00100">NLNET::cbWSChooseShard()</a>, <a class="el" href="a05961.html#l00083">setFromString()</a>, and <a class="el" href="a05961.html#l00068">setToString()</a>.
+<p>
+<div class="fragment"><pre>00096 {
+00097 <span class="keywordflow">if</span> (<a class="code" href="a02827.html#NLNET_1_1CLoginCookier3">_Valid</a>)
+00098 <span class="keywordflow">return</span> <span class="stringliteral">"'"</span> + <a class="code" href="a05378.html#a244">NLMISC::toString</a>(<span class="stringliteral">"%08X"</span>, (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)_UserAddr) + <span class="stringliteral">"|"</span> + <a class="code" href="a05378.html#a244">NLMISC::toString</a>(<span class="stringliteral">"%08X"</span>, (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)_UserKey) + <span class="stringliteral">"|"</span> + <a class="code" href="a05378.html#a244">NLMISC::toString</a>(<span class="stringliteral">"%08X"</span>, (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>)_UserId) + <span class="stringliteral">"'"</span>;
+00099 <span class="keywordflow">else</span>
+00100 <span class="keywordflow">return</span> <span class="stringliteral">"&lt;InvalidCookie&gt;"</span>;
+00101 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Friends And Related Function Documentation</h2>
+<a class="anchor" name="NLNET_1_1CLoginCookien0" doxytag="NLNET::CLoginCookie::operator==" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> bool operator== </td>
+ <td class="md" valign="top">(&nbsp;</td>
+ <td class="md" nowrap valign="top">const <a class="el" href="a02827.html">CLoginCookie</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>c1</em>, </td>
+ </tr>
+ <tr>
+ <td class="md" nowrap align="right"></td>
+ <td></td>
+ <td class="md" nowrap>const <a class="el" href="a02827.html">CLoginCookie</a> &amp;&nbsp;</td>
+ <td class="mdname" nowrap> <em>c2</em></td>
+ </tr>
+ <tr>
+ <td></td>
+ <td class="md">)&nbsp;</td>
+ <td class="md" colspan="2"><code> [friend]</code></td>
+ </tr>
+
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+Comparison == operator.
+<p>
+
+<p>
+Definition at line <a class="el" href="a05960.html#l00040">40</a> of file <a class="el" href="a05960.html">login_cookie.cpp</a>.
+<p>
+<div class="fragment"><pre>00041 {
+00042 <a class="code" href="a04199.html#a6">nlassert</a> (c1._Valid &amp;&amp; c2._Valid);
+00043
+00044 <span class="keywordflow">return</span> c1._UserAddr==c2._UserAddr &amp;&amp; c1._UserKey==c2._UserKey &amp;&amp; c1._UserId==c2._UserId;
+00045 }
+</pre></div> </td>
+ </tr>
+</table>
+<hr><h2>Field Documentation</h2>
+<a class="anchor" name="NLNET_1_1CLoginCookier0" doxytag="NLNET::CLoginCookie::_UserAddr" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a02827.html#NLNET_1_1CLoginCookier0">NLNET::CLoginCookie::_UserAddr</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05961.html#l00121">121</a> of file <a class="el" href="a05961.html">login_cookie.h</a>.
+<p>
+Referenced by <a class="el" href="a05961.html#l00103">getUserAddr()</a>, <a class="el" href="a05960.html#l00040">NLNET::operator==()</a>, <a class="el" href="a05961.html#l00056">serial()</a>, <a class="el" href="a05961.html#l00107">set()</a>, <a class="el" href="a05961.html#l00083">setFromString()</a>, <a class="el" href="a05961.html#l00068">setToString()</a>, and <a class="el" href="a05961.html#l00095">toString()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CLoginCookier1" doxytag="NLNET::CLoginCookie::_UserId" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a02827.html#NLNET_1_1CLoginCookier1">NLNET::CLoginCookie::_UserId</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05961.html#l00123">123</a> of file <a class="el" href="a05961.html">login_cookie.h</a>.
+<p>
+Referenced by <a class="el" href="a05961.html#l00105">getUserId()</a>, <a class="el" href="a05960.html#l00040">NLNET::operator==()</a>, <a class="el" href="a05961.html#l00056">serial()</a>, <a class="el" href="a05961.html#l00107">set()</a>, <a class="el" href="a05961.html#l00083">setFromString()</a>, <a class="el" href="a05961.html#l00068">setToString()</a>, and <a class="el" href="a05961.html#l00095">toString()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CLoginCookier2" doxytag="NLNET::CLoginCookie::_UserKey" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> <a class="el" href="a04558.html#a11">uint32</a> <a class="el" href="a02827.html#NLNET_1_1CLoginCookier2">NLNET::CLoginCookie::_UserKey</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05961.html#l00122">122</a> of file <a class="el" href="a05961.html">login_cookie.h</a>.
+<p>
+Referenced by <a class="el" href="a05960.html#l00047">CLoginCookie()</a>, <a class="el" href="a05961.html#l00104">getUserKey()</a>, <a class="el" href="a05960.html#l00040">NLNET::operator==()</a>, <a class="el" href="a05961.html#l00056">serial()</a>, <a class="el" href="a05961.html#l00107">set()</a>, <a class="el" href="a05961.html#l00083">setFromString()</a>, <a class="el" href="a05961.html#l00068">setToString()</a>, and <a class="el" href="a05961.html#l00095">toString()</a>. </td>
+ </tr>
+</table>
+<a class="anchor" name="NLNET_1_1CLoginCookier3" doxytag="NLNET::CLoginCookie::_Valid" ></a><p>
+<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
+ <tr>
+ <td class="mdRow">
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td class="md" nowrap valign="top"> bool <a class="el" href="a02827.html#NLNET_1_1CLoginCookier3">NLNET::CLoginCookie::_Valid</a><code> [private]</code>
+ </table>
+ </td>
+ </tr>
+</table>
+<table cellspacing=5 cellpadding=0 border=0>
+ <tr>
+ <td>
+ &nbsp;
+ </td>
+ <td>
+
+<p>
+
+<p>
+Definition at line <a class="el" href="a05961.html#l00119">119</a> of file <a class="el" href="a05961.html">login_cookie.h</a>.
+<p>
+Referenced by <a class="el" href="a05960.html#l00040">NLNET::operator==()</a>. </td>
+ </tr>
+</table>
+<hr>The documentation for this class was generated from the following files:<ul>
+<li><a class="el" href="a05961.html">login_cookie.h</a><li><a class="el" href="a05960.html">login_cookie.cpp</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Tue Mar 16 13:58:34 2004 for NeL by
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border=0 >
+</a>1.3.6 </small></address>
+</body>
+</html>