mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-18 05:11:42 +00:00
313 lines
14 KiB
HTML
313 lines
14 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||
|
<title>Ryzom Account Management System: MyCrypt Class Reference</title>
|
||
|
|
||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||
|
|
||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="jquery.js"></script>
|
||
|
<script type="text/javascript" src="search/search.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||
|
</script>
|
||
|
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="top"><!-- do not remove this div! -->
|
||
|
|
||
|
|
||
|
<div id="titlearea">
|
||
|
<table cellspacing="0" cellpadding="0">
|
||
|
<tbody>
|
||
|
<tr style="height: 56px;">
|
||
|
|
||
|
|
||
|
<td style="padding-left: 0.5em;">
|
||
|
<div id="projectname">Ryzom Account Management System
|
||
|
|
||
|
</div>
|
||
|
|
||
|
</td>
|
||
|
|
||
|
|
||
|
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
<!-- Generated by Doxygen 1.7.6.1 -->
|
||
|
<script type="text/javascript">
|
||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||
|
</script>
|
||
|
<div id="navrow1" class="tabs">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
||
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
||
|
<li><a href="dirs.html"><span>Directories</span></a></li>
|
||
|
<li>
|
||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||
|
<span class="left">
|
||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
alt=""/>
|
||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||
|
</span><span class="right">
|
||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||
|
</span>
|
||
|
</div>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div id="navrow2" class="tabs2">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
||
|
<li><a href="classes.html"><span>Class Index</span></a></li>
|
||
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
||
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="header">
|
||
|
<div class="summary">
|
||
|
<a href="#pub-methods">Public Member Functions</a> |
|
||
|
<a href="#pri-static-methods">Static Private Member Functions</a> |
|
||
|
<a href="#pri-attribs">Private Attributes</a> </div>
|
||
|
<div class="headertitle">
|
||
|
<div class="title">MyCrypt Class Reference</div> </div>
|
||
|
</div><!--header-->
|
||
|
<div class="contents">
|
||
|
<!-- doxytag: class="MyCrypt" -->
|
||
|
<p>Basic encryption/decryption class.
|
||
|
<a href="classMyCrypt.html#details">More...</a></p>
|
||
|
|
||
|
<p><a href="classMyCrypt-members.html">List of all members.</a></p>
|
||
|
<table class="memberdecls">
|
||
|
<tr><td colspan="2"><h2><a name="pub-methods"></a>
|
||
|
Public Member Functions</h2></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMyCrypt.html#a35146c564f37f0b0274dfa0c05d3ba13">__construct</a> ($cryptinfo)</td></tr>
|
||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">constructor. <a href="#a35146c564f37f0b0274dfa0c05d3ba13"></a><br/></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMyCrypt.html#a72a803d99bc6687a64d0d80043a7516c">encrypt</a> ($data)</td></tr>
|
||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">encrypts by using the given enc_method and hash_method. <a href="#a72a803d99bc6687a64d0d80043a7516c"></a><br/></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classMyCrypt.html#a8833cd07b177eaac011d154ad46991c4">decrypt</a> ($edata)</td></tr>
|
||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">decrypts by using the given enc_method and hash_method. <a href="#a8833cd07b177eaac011d154ad46991c4"></a><br/></td></tr>
|
||
|
<tr><td colspan="2"><h2><a name="pri-static-methods"></a>
|
||
|
Static Private Member Functions</h2></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classMyCrypt.html#a338bfce76aec4f14c73af16e7c0b6fe6">hashIV</a> ($key, $method, $iv_size)</td></tr>
|
||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">hashes the key by using a hash method specified. <a href="#a338bfce76aec4f14c73af16e7c0b6fe6"></a><br/></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top">static </td><td class="memItemRight" valign="bottom"><a class="el" href="classMyCrypt.html#a20dcd7883eb21d0f6f62175891c9e51c">check_methods</a> ($enc, $hash)</td></tr>
|
||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">checks if the encryption and hash methods are supported <a href="#a20dcd7883eb21d0f6f62175891c9e51c"></a><br/></td></tr>
|
||
|
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
|
||
|
Private Attributes</h2></td></tr>
|
||
|
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9701fd447bb31495494d7580f8fbad31"></a><!-- doxytag: member="MyCrypt::$config" ref="a9701fd447bb31495494d7580f8fbad31" args="" -->
|
||
|
 </td><td class="memItemRight" valign="bottom"><a class="el" href="classMyCrypt.html#a9701fd447bb31495494d7580f8fbad31">$config</a></td></tr>
|
||
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">array that should contain the enc_method & hash_method & key <br/></td></tr>
|
||
|
</table>
|
||
|
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
|
||
|
<div class="textblock"><p>Basic encryption/decryption class. </p>
|
||
|
<p>We use this class atm for encrypting & decrypting the imap passwords. </p>
|
||
|
</div><hr/><h2>Constructor & Destructor Documentation</h2>
|
||
|
<a class="anchor" id="a35146c564f37f0b0274dfa0c05d3ba13"></a><!-- doxytag: member="MyCrypt::__construct" ref="a35146c564f37f0b0274dfa0c05d3ba13" args="($cryptinfo)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname"><a class="el" href="classMyCrypt.html#a35146c564f37f0b0274dfa0c05d3ba13">MyCrypt::__construct</a> </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">$ </td>
|
||
|
<td class="paramname"><em>cryptinfo</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>constructor. </p>
|
||
|
<p>loads the config array with the given argument. </p>
|
||
|
<dl class="params"><dt><b>Parameters:</b></dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">$cryptinfo</td><td>an array containing the info needed to encrypt & decrypt.(enc_method & hash_method & key) </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<hr/><h2>Member Function Documentation</h2>
|
||
|
<a class="anchor" id="a20dcd7883eb21d0f6f62175891c9e51c"></a><!-- doxytag: member="MyCrypt::check_methods" ref="a20dcd7883eb21d0f6f62175891c9e51c" args="($enc, $hash)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">static <a class="el" href="classMyCrypt.html#a20dcd7883eb21d0f6f62175891c9e51c">MyCrypt::check_methods</a> </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">$ </td>
|
||
|
<td class="paramname"><em>enc</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">$ </td>
|
||
|
<td class="paramname"><em>hash</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td><code> [static, private]</code></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>checks if the encryption and hash methods are supported </p>
|
||
|
<dl class="params"><dt><b>Parameters:</b></dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">$enc</td><td>the encryption method. </td></tr>
|
||
|
<tr><td class="paramname">$hash</td><td>the hash method. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="exception"><dt><b>Exceptions:</b></dt><dd>
|
||
|
<table class="exception">
|
||
|
<tr><td class="paramname">Exception</td><td>in case a method is not supported. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a8833cd07b177eaac011d154ad46991c4"></a><!-- doxytag: member="MyCrypt::decrypt" ref="a8833cd07b177eaac011d154ad46991c4" args="($edata)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname"><a class="el" href="classMyCrypt.html#a8833cd07b177eaac011d154ad46991c4">MyCrypt::decrypt</a> </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">$ </td>
|
||
|
<td class="paramname"><em>edata</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>decrypts by using the given enc_method and hash_method. </p>
|
||
|
<dl class="params"><dt><b>Parameters:</b></dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">$edata</td><td>the encrypted string that we want to decrypt </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="return"><dt><b>Returns:</b></dt><dd>the decrypted string. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a72a803d99bc6687a64d0d80043a7516c"></a><!-- doxytag: member="MyCrypt::encrypt" ref="a72a803d99bc6687a64d0d80043a7516c" args="($data)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname"><a class="el" href="classMyCrypt.html#a72a803d99bc6687a64d0d80043a7516c">MyCrypt::encrypt</a> </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">$ </td>
|
||
|
<td class="paramname"><em>data</em></td><td>)</td>
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>encrypts by using the given enc_method and hash_method. </p>
|
||
|
<p>It will first check if the methods are supported, if not it will throw an error, if so it will encrypt the $data </p>
|
||
|
<dl class="params"><dt><b>Parameters:</b></dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">$data</td><td>the string that we want to encrypt. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="return"><dt><b>Returns:</b></dt><dd>the encrypted string. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<a class="anchor" id="a338bfce76aec4f14c73af16e7c0b6fe6"></a><!-- doxytag: member="MyCrypt::hashIV" ref="a338bfce76aec4f14c73af16e7c0b6fe6" args="($key, $method, $iv_size)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">static <a class="el" href="classMyCrypt.html#a338bfce76aec4f14c73af16e7c0b6fe6">MyCrypt::hashIV</a> </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">$ </td>
|
||
|
<td class="paramname"><em>key</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">$ </td>
|
||
|
<td class="paramname"><em>method</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">$ </td>
|
||
|
<td class="paramname"><em>iv_size</em> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td><code> [static, private]</code></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>hashes the key by using a hash method specified. </p>
|
||
|
<dl class="params"><dt><b>Parameters:</b></dt><dd>
|
||
|
<table class="params">
|
||
|
<tr><td class="paramname">$key</td><td>the key to be hashed </td></tr>
|
||
|
<tr><td class="paramname">$method</td><td>the metho of hashing to be used </td></tr>
|
||
|
<tr><td class="paramname">$iv_size</td><td>the size of the initialization vector. </td></tr>
|
||
|
</table>
|
||
|
</dd>
|
||
|
</dl>
|
||
|
<dl class="return"><dt><b>Returns:</b></dt><dd>return the hashed key up till the size of the iv_size param. </dd></dl>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
||
|
<li>/home/daan/ryzom/ryzomcore/code/ryzom/tools/server/ryzom_ams/ams_lib/autoload/mycrypt.php</li>
|
||
|
</ul>
|
||
|
</div><!-- contents -->
|
||
|
<!-- window showing the filter options -->
|
||
|
<div id="MSearchSelectWindow"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Variables</a></div>
|
||
|
|
||
|
<!-- iframe showing the search results (closed by default) -->
|
||
|
<div id="MSearchResultsWindow">
|
||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||
|
name="MSearchResults" id="MSearchResults">
|
||
|
</iframe>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
<hr class="footer"/><address class="footer"><small>
|
||
|
Generated on Fri Sep 13 2013 00:20:37 for Ryzom Account Management System by  <a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||
|
</a> 1.7.6.1
|
||
|
</small></address>
|
||
|
|
||
|
</body>
|
||
|
</html>
|