PageRenderTime 25ms CodeModel.GetById 8ms app.highlight 12ms RepoModel.GetById 1ms app.codeStats 0ms

/doc/core/z_ids.html

https://code.google.com/p/zotonic/
HTML | 142 lines | 118 code | 24 blank | 0 comment | 0 complexity | 74a9a994278e49dd7a1354c2bbbac95d MD5 | raw file
  1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2<html>
  3<head>
  4<title>Module z_ids</title>
  5<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
  6</head>
  7<body bgcolor="white">
  8<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
  9<hr>
 10
 11<h1>Module z_ids</h1>
 12<ul class="index"><li><a href="#description">Description</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>Server supplying random strings and unique ids.
 13<p>Copyright Š 2009 Marc Worrell</p>
 14
 15<p><b>Behaviours:</b> <a href="gen_server.html"><tt>gen_server</tt></a>.</p>
 16<p><b>Authors:</b> Marc Worrell (<a href="mailto:marc@worrell.nl"><tt>marc@worrell.nl</tt></a>).</p>
 17
 18<h2><a name="description">Description</a></h2>Server supplying random strings and unique ids
 19<h2><a name="index">Function Index</a></h2>
 20<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#code_change-3">code_change/3</a></td><td></td></tr>
 21<tr><td valign="top"><a href="#fix_seed-0">fix_seed/0</a></td><td>Fix the seed of the random number generator, used for tests.</td></tr>
 22<tr><td valign="top"><a href="#handle_call-3">handle_call/3</a></td><td></td></tr>
 23<tr><td valign="top"><a href="#handle_cast-2">handle_cast/2</a></td><td></td></tr>
 24<tr><td valign="top"><a href="#handle_info-2">handle_info/2</a></td><td></td></tr>
 25<tr><td valign="top"><a href="#id-0">id/0</a></td><td>Return a long random id, can be used for session ids.</td></tr>
 26<tr><td valign="top"><a href="#id-1">id/1</a></td><td></td></tr>
 27<tr><td valign="top"><a href="#identifier-0">identifier/0</a></td><td>Get a random indentifier of a certain length, case insensitive.</td></tr>
 28<tr><td valign="top"><a href="#identifier-1">identifier/1</a></td><td></td></tr>
 29<tr><td valign="top"><a href="#init-1">init/1</a></td><td></td></tr>
 30<tr><td valign="top"><a href="#number-0">number/0</a></td><td>Return a big random integer, but smaller than maxint32.</td></tr>
 31<tr><td valign="top"><a href="#number-1">number/1</a></td><td></td></tr>
 32<tr><td valign="top"><a href="#optid-1">optid/1</a></td><td></td></tr>
 33<tr><td valign="top"><a href="#sign_key-1">sign_key/1</a></td><td>Get the key for signing requests stored in the user agent.</td></tr>
 34<tr><td valign="top"><a href="#sign_key_simple-1">sign_key_simple/1</a></td><td>Get the key for less secure signing of data (without nonce).</td></tr>
 35<tr><td valign="top"><a href="#start_link-0">start_link/0</a></td><td></td></tr>
 36<tr><td valign="top"><a href="#start_tests-0">start_tests/0</a></td><td></td></tr>
 37<tr><td valign="top"><a href="#terminate-2">terminate/2</a></td><td></td></tr>
 38<tr><td valign="top"><a href="#unique-0">unique/0</a></td><td>Return an unique id to be used in javascript or html.</td></tr>
 39</table>
 40
 41<h2><a name="functions">Function Details</a></h2>
 42
 43<h3 class="function"><a name="code_change-3">code_change/3</a></h3>
 44<div class="spec">
 45<p><tt>code_change(OldVersion, State, Extra) -&gt; any()</tt></p>
 46</div>
 47
 48<h3 class="function"><a name="fix_seed-0">fix_seed/0</a></h3>
 49<div class="spec">
 50<p><tt>fix_seed() -&gt; any()</tt></p>
 51</div><p>Fix the seed of the random number generator, used for tests</p>
 52
 53<h3 class="function"><a name="handle_call-3">handle_call/3</a></h3>
 54<div class="spec">
 55<p><tt>handle_call(Msg, From, State) -&gt; any()</tt></p>
 56</div>
 57
 58<h3 class="function"><a name="handle_cast-2">handle_cast/2</a></h3>
 59<div class="spec">
 60<p><tt>handle_cast(Msg, State) -&gt; any()</tt></p>
 61</div>
 62
 63<h3 class="function"><a name="handle_info-2">handle_info/2</a></h3>
 64<div class="spec">
 65<p><tt>handle_info(Msg, State) -&gt; any()</tt></p>
 66</div>
 67
 68<h3 class="function"><a name="id-0">id/0</a></h3>
 69<div class="spec">
 70<p><tt>id() -&gt; any()</tt></p>
 71</div><p>Return a long random id, can be used for session ids.</p>
 72
 73<h3 class="function"><a name="id-1">id/1</a></h3>
 74<div class="spec">
 75<p><tt>id(Len) -&gt; any()</tt></p>
 76</div>
 77
 78<h3 class="function"><a name="identifier-0">identifier/0</a></h3>
 79<div class="spec">
 80<p><tt>identifier() -&gt; binary()</tt></p>
 81</div><p>Get a random indentifier of a certain length, case insensitive</p>
 82
 83<h3 class="function"><a name="identifier-1">identifier/1</a></h3>
 84<div class="spec">
 85<p><tt>identifier(Len) -&gt; any()</tt></p>
 86</div>
 87
 88<h3 class="function"><a name="init-1">init/1</a></h3>
 89<div class="spec">
 90<p><tt>init(Props) -&gt; any()</tt></p>
 91</div>
 92
 93<h3 class="function"><a name="number-0">number/0</a></h3>
 94<div class="spec">
 95<p><tt>number() -&gt; any()</tt></p>
 96</div><p>Return a big random integer, but smaller than maxint32</p>
 97
 98<h3 class="function"><a name="number-1">number/1</a></h3>
 99<div class="spec">
100<p><tt>number(Max) -&gt; any()</tt></p>
101</div>
102
103<h3 class="function"><a name="optid-1">optid/1</a></h3>
104<div class="spec">
105<p><tt>optid(Id) -&gt; any()</tt></p>
106</div>
107
108<h3 class="function"><a name="sign_key-1">sign_key/1</a></h3>
109<div class="spec">
110<p><tt>sign_key(Context) -&gt; binary()</tt></p>
111</div><p>Get the key for signing requests stored in the user agent.</p>
112
113<h3 class="function"><a name="sign_key_simple-1">sign_key_simple/1</a></h3>
114<div class="spec">
115<p><tt>sign_key_simple(Context) -&gt; binary()</tt></p>
116</div><p>Get the key for less secure signing of data (without nonce).</p>
117
118<h3 class="function"><a name="start_link-0">start_link/0</a></h3>
119<div class="spec">
120<p><tt>start_link() -&gt; any()</tt></p>
121</div>
122
123<h3 class="function"><a name="start_tests-0">start_tests/0</a></h3>
124<div class="spec">
125<p><tt>start_tests() -&gt; any()</tt></p>
126</div>
127
128<h3 class="function"><a name="terminate-2">terminate/2</a></h3>
129<div class="spec">
130<p><tt>terminate(Reason, State) -&gt; any()</tt></p>
131</div>
132
133<h3 class="function"><a name="unique-0">unique/0</a></h3>
134<div class="spec">
135<p><tt>unique() -&gt; any()</tt></p>
136</div><p>Return an unique id to be used in javascript or html.  No randomness, just unique in the cluster.</p>
137<hr>
138
139<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
140<p><i>Generated by EDoc, Aug 12 2011, 20:01:40.</i></p>
141</body>
142</html>