aboutsummaryrefslogblamecommitdiffstats
path: root/doc/html/crypto_8php.html
blob: 795c4c9374f27e94b08b0329be4026137e49861e (plain) (tree)
1
2
3
4
5
6
7





                                                                                                                         
                                                                






















                                                                       
                                                                
                                   
                                       




















































































                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             

                                                                                                                                                                                                                                                                                









































































































                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     


























                                                             
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    


      













                                                             
                                                                                                                                                                                                                                                                                                                     


      
                                                             



                             
                                             







































                                                                                                                     





























                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 






































                                                                                
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    




                          
 
<!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"/>
<meta name="generator" content="Doxygen 1.8.3.1"/>
<title>The Red Matrix: include/crypto.php File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="rhash-64.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">The Red Matrix
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.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&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</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="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('crypto_8php.html','');});
</script>
<div id="doc-content">
<!-- 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">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Pages</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>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">crypto.php File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a920e5f222d0020f47556033d8b2b6552"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crypto_8php.html#a920e5f222d0020f47556033d8b2b6552">rsa_sign</a> ($data, $key, $alg= 'sha256')</td></tr>
<tr class="separator:a920e5f222d0020f47556033d8b2b6552"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4f21d8f6b8ece0915e7c8bb73379f96"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crypto_8php.html#ab4f21d8f6b8ece0915e7c8bb73379f96">rsa_verify</a> ($data, $sig, $key, $alg= 'sha256')</td></tr>
<tr class="separator:ab4f21d8f6b8ece0915e7c8bb73379f96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5e51fd44cff93cfaa07a37e24a5edec"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crypto_8php.html#ad5e51fd44cff93cfaa07a37e24a5edec">pkcs5_pad</a> ($text, $blocksize)</td></tr>
<tr class="separator:ad5e51fd44cff93cfaa07a37e24a5edec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac95ac3b1b23b65b04a86613d4206ae85"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crypto_8php.html#ac95ac3b1b23b65b04a86613d4206ae85">pkcs5_unpad</a> ($text)</td></tr>
<tr class="separator:ac95ac3b1b23b65b04a86613d4206ae85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c61821d205f95f127114159cbffa764"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crypto_8php.html#a5c61821d205f95f127114159cbffa764">AES256CBC_encrypt</a> ($data, $key, $iv)</td></tr>
<tr class="separator:a5c61821d205f95f127114159cbffa764"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac852ee41392d1358c3a54d54935e0bf9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crypto_8php.html#ac852ee41392d1358c3a54d54935e0bf9">AES256CBC_decrypt</a> ($data, $key, $iv)</td></tr>
<tr class="separator:ac852ee41392d1358c3a54d54935e0bf9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2148d7aac7b30c720f7ebda7e9790286"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crypto_8php.html#a2148d7aac7b30c720f7ebda7e9790286">aes_encapsulate</a> ($data, $pubkey)</td></tr>
<tr class="separator:a2148d7aac7b30c720f7ebda7e9790286"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca7c3a574bfb6c6ef1f2403a56823914"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crypto_8php.html#aca7c3a574bfb6c6ef1f2403a56823914">aes_unencapsulate</a> ($data, $prvkey)</td></tr>
<tr class="separator:aca7c3a574bfb6c6ef1f2403a56823914"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae0ab70d6a199b29555b1ac3cf250d6a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="crypto_8php.html#aae0ab70d6a199b29555b1ac3cf250d6a">new_keypair</a> ($bits)</td></tr>
<tr class="separator:aae0ab70d6a199b29555b1ac3cf250d6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ac852ee41392d1358c3a54d54935e0bf9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">AES256CBC_decrypt </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$iv</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Referenced by <a class="el" href="crypto_8php.html#aca7c3a574bfb6c6ef1f2403a56823914">aes_unencapsulate()</a>.</p>

</div>
</div>
<a class="anchor" id="a5c61821d205f95f127114159cbffa764"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">AES256CBC_encrypt </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$iv</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Referenced by <a class="el" href="crypto_8php.html#a2148d7aac7b30c720f7ebda7e9790286">aes_encapsulate()</a>.</p>

</div>
</div>
<a class="anchor" id="a2148d7aac7b30c720f7ebda7e9790286"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">aes_encapsulate </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$pubkey</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Referenced by <a class="el" href="items_8php.html#a536d0313b6ffe33b9d2490c4e25c5361">get_item_elements()</a>, <a class="el" href="items_8php.html#a94ddb1d6c8fa21dd7433677e85168037">get_mail_elements()</a>, <a class="el" href="item_8php.html#a693cd09805755ab85bbb5ecae69a48c3">item_post()</a>, <a class="el" href="items_8php.html#a2541e6861a56d145c9281877cc501615">item_store()</a>, <a class="el" href="post_8php.html#af59e6a1dc22d19d9257b01cd7ccedb75">post_post()</a>, <a class="el" href="include_2message_8php.html#ac382fdcdf990dcfa8f6528ab8fd280bd">send_message()</a>, <a class="el" href="zfinger_8php.html#a8139b83a22ef98869adc10aa224027a0">zfinger_init()</a>, <a class="el" href="zot_8php.html#a3862b3161b2c8557dc1a95020179bd81">zot_build_packet()</a>, and <a class="el" href="zot_8php.html#a61cdc1ec843663c423ed2d8160ae5aea">zot_fetch()</a>.</p>

</div>
</div>
<a class="anchor" id="aca7c3a574bfb6c6ef1f2403a56823914"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">aes_unencapsulate </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$prvkey</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Referenced by <a class="el" href="editpost_8php.html#a34011690864d122680c802e9e748ccfb">editpost_content()</a>, <a class="el" href="items_8php.html#a82955cc578f0fa600acec84475026194">encode_item()</a>, <a class="el" href="items_8php.html#a2d840c74ed23d1b6c7daee05cf89dda7">encode_mail()</a>, <a class="el" href="mod_2message_8php.html#a0db7030362a7e9ed9549b341d7b35718">message_post()</a>, <a class="el" href="include_2follow_8php.html#a6553a7650fae55f95660510d90983144">new_contact()</a>, <a class="el" href="post_8php.html#af59e6a1dc22d19d9257b01cd7ccedb75">post_post()</a>, <a class="el" href="text_8php.html#ae4df74296fbe55051ed3c035e55205e5">prepare_body()</a>, <a class="el" href="include_2message_8php.html#a5f8de9847e203329e317ac38dc646898">private_messages_fetch_conversation()</a>, <a class="el" href="include_2message_8php.html#a254a756031e4d5e94f85e2939bdb5091">private_messages_fetch_message()</a>, <a class="el" href="include_2message_8php.html#a652973ce47a262f2d238c2fd6233d97e">private_messages_list()</a>, <a class="el" href="probe_8php.html#a1f1db3fa6038e451e737964c94bf5e99">probe_content()</a>, <a class="el" href="zot_8php.html#a22e3f9b97b7969ddbe43ccf0db93a19c">zot_import()</a>, and <a class="el" href="zot_8php.html#a7b23bfb31d4491231e1e73bdc077240d">zot_refresh()</a>.</p>

</div>
</div>
<a class="anchor" id="aae0ab70d6a199b29555b1ac3cf250d6a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">new_keypair </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$bits</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Referenced by <a class="el" href="account_8php.html#a141fe579c351c78209d425473f978eb5">create_account()</a>, <a class="el" href="identity_8php.html#a345f4c943d84de502ec6e72d2c813945">create_identity()</a>, and <a class="el" href="hostxrd_8php.html#aa37ffc8e7900bc76c4828bd25916db92">hostxrd_init()</a>.</p>

</div>
</div>
<a class="anchor" id="ad5e51fd44cff93cfaa07a37e24a5edec"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">pkcs5_pad </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$text</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$blocksize</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Referenced by <a class="el" href="crypto_8php.html#a5c61821d205f95f127114159cbffa764">AES256CBC_encrypt()</a>.</p>

</div>
</div>
<a class="anchor" id="ac95ac3b1b23b65b04a86613d4206ae85"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">pkcs5_unpad </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$text</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Referenced by <a class="el" href="crypto_8php.html#ac852ee41392d1358c3a54d54935e0bf9">AES256CBC_decrypt()</a>.</p>

</div>
</div>
<a class="anchor" id="a920e5f222d0020f47556033d8b2b6552"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">rsa_sign </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$alg</em> = <code>'sha256'</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Referenced by <a class="el" href="identity_8php.html#a345f4c943d84de502ec6e72d2c813945">create_identity()</a>, <a class="el" href="boot_8php.html#aca5e42678e178c6b9034610d66666fd7">fix_system_urls()</a>, <a class="el" href="import_8php.html#af17fef0410518f7eac205d0ea416eaa2">import_post()</a>, <a class="el" href="magic_8php.html#acea2cc792849ca2d71d4b689f66518bf">magic_init()</a>, <a class="el" href="post_8php.html#af59e6a1dc22d19d9257b01cd7ccedb75">post_post()</a>, <a class="el" href="zfinger_8php.html#a8139b83a22ef98869adc10aa224027a0">zfinger_init()</a>, <a class="el" href="zot_8php.html#a3862b3161b2c8557dc1a95020179bd81">zot_build_packet()</a>, and <a class="el" href="zot_8php.html#a61cdc1ec843663c423ed2d8160ae5aea">zot_fetch()</a>.</p>

</div>
</div>
<a class="anchor" id="ab4f21d8f6b8ece0915e7c8bb73379f96"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">rsa_verify </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$sig</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>$alg</em> = <code>'sha256'</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Referenced by <a class="el" href="zot_8php.html#a2657e141d62d5f67ad3c87651b585299">import_site()</a>, <a class="el" href="zot_8php.html#ab0227978011d8601494a7651fa26acf0">import_xchan()</a>, <a class="el" href="post_8php.html#af4b48181ce773ef0cdfc972441445c34">post_init()</a>, <a class="el" href="post_8php.html#af59e6a1dc22d19d9257b01cd7ccedb75">post_post()</a>, and <a class="el" href="zfinger_8php.html#a8139b83a22ef98869adc10aa224027a0">zfinger_init()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->