doc/rdoc/more/classes/Crypt.html in facets-2.4.3 vs doc/rdoc/more/classes/Crypt.html in facets-2.4.4

- old
+ new

@@ -69,22 +69,22 @@ <div id="bodyContent"> <div id="content"> <div class="description"><h1><a href="Crypt.html">Crypt</a></h1> <p> -A pure ruby version of <a href="Crypt.html#M000917">crypt</a>(3), a salted +A pure ruby version of <a href="Crypt.html#M000950">crypt</a>(3), a salted one-way hashing of a password. </p> </div> <div class="sectiontitle">Methods</div> <ul> - <li><a href="#M000918">check</a></li> - <li><a href="#M000917">crypt</a></li> - <li><a href="#M000919">generate_salt</a></li> + <li><a href="#M000951">check</a></li> + <li><a href="#M000950">crypt</a></li> + <li><a href="#M000952">generate_salt</a></li> </ul> @@ -99,21 +99,21 @@ <div class="sectiontitle">Public Class methods</div> <div class="method"> <div class="title"> - <a name="M000918"></a><b>check</b>(password, hash, algo = :md5) + <a name="M000951"></a><b>check</b>(password, hash, algo = :md5) </div> <div class="description"> <p> -<a href="Crypt.html#M000918">check</a> the validity of a password against +<a href="Crypt.html#M000951">check</a> the validity of a password against an hashed string </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000918_source')" id="l_M000918_source">show source</a> ]</p> - <div id="M000918_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000951_source')" id="l_M000951_source">show source</a> ]</p> + <div id="M000951_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File lib/more/facets/crypt.rb, line 153</span> <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">check</span>(<span class="ruby-identifier">password</span>, <span class="ruby-identifier">hash</span>, <span class="ruby-identifier">algo</span> = <span class="ruby-identifier">:md5</span>) <span class="ruby-identifier">magic</span>, <span class="ruby-identifier">salt</span> = <span class="ruby-identifier">hash</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">'$'</span>)[<span class="ruby-value">1</span>,<span class="ruby-value">2</span>] <span class="ruby-identifier">magic</span> = <span class="ruby-value str">'$'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">magic</span> <span class="ruby-operator">+</span> <span class="ruby-value str">'$'</span> @@ -123,36 +123,36 @@ </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000917"></a><b>crypt</b>(password, algo = :md5, salt = nil, magic='$1$') + <a name="M000950"></a><b>crypt</b>(password, algo = :md5, salt = nil, magic='$1$') </div> <div class="description"> <p> -A pure ruby version of <a href="Crypt.html#M000917">crypt</a>(3), a salted +A pure ruby version of <a href="Crypt.html#M000950">crypt</a>(3), a salted one-way hashing of a password. </p> <p> Supported hashing algorithms are: md5, sha1, sha256, sha384, sha512, rmd160. </p> <p> Only the md5 hashing algorithm is standard and compatible with <a -href="Crypt.html#M000917">crypt</a>(3), the others are not standard. +href="Crypt.html#M000950">crypt</a>(3), the others are not standard. </p> <p> Automatically generate a 8-bytes salt if nil. </p> <p> Output a length hashed and salted string with size of magic.size + salt.size + 23. </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000917_source')" id="l_M000917_source">show source</a> ]</p> - <div id="M000917_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000950_source')" id="l_M000950_source">show source</a> ]</p> + <div id="M000950_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File lib/more/facets/crypt.rb, line 58</span> <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">crypt</span>(<span class="ruby-identifier">password</span>, <span class="ruby-identifier">algo</span> = <span class="ruby-identifier">:md5</span>, <span class="ruby-identifier">salt</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">magic</span>=<span class="ruby-value str">'$1$'</span>) <span class="ruby-identifier">salt</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">generate_salt</span>(<span class="ruby-value">8</span>) @@ -248,19 +248,19 @@ </div> </div> </div> <div class="method"> <div class="title"> - <a name="M000919"></a><b>generate_salt</b>(size) + <a name="M000952"></a><b>generate_salt</b>(size) </div> <div class="description"> <p> generate a <tt>size</tt> length random salt </p> </div> <div class="sourcecode"> - <p class="source-link">[ <a href="javascript:toggleSource('M000919_source')" id="l_M000919_source">show source</a> ]</p> - <div id="M000919_source" class="dyn-source"> + <p class="source-link">[ <a href="javascript:toggleSource('M000952_source')" id="l_M000952_source">show source</a> ]</p> + <div id="M000952_source" class="dyn-source"> <pre> <span class="ruby-comment cmt"># File lib/more/facets/crypt.rb, line 162</span> <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">generate_salt</span>(<span class="ruby-identifier">size</span>) (<span class="ruby-value">1</span><span class="ruby-operator">..</span><span class="ruby-identifier">size</span>).<span class="ruby-identifier">collect</span> { <span class="ruby-constant">ITOA64</span>[<span class="ruby-identifier">rand</span>(<span class="ruby-constant">ITOA64</span>.<span class="ruby-identifier">size</span>)].<span class="ruby-identifier">chr</span> }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;&quot;</span>) <span class="ruby-keyword kw">end</span> \ No newline at end of file