123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234 |
- <!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.11"/>
- <title>libwebsockets: SHA and B64 helpers</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="navtreedata.js"></script>
- <script type="text/javascript" src="navtree.js"></script>
- <script type="text/javascript">
- $(document).ready(initResizable);
- $(window).load(resizeHeight);
- </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="libwebsockets.org-logo.png"/></td>
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">libwebsockets
- </div>
- <div id="projectbrief">Lightweight C library for HTML5 websockets</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.11 -->
- <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="modules.html"><span>Modules</span></a></li>
- <li><a href="annotated.html"><span>Data Structures</span></a></li>
- <li><a href="files.html"><span>Files</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('group__sha.html','');});
- </script>
- <div id="doc-content">
- <div class="header">
- <div class="summary">
- <a href="#func-members">Functions</a> </div>
- <div class="headertitle">
- <div class="title">SHA and B64 helpers</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:ga7b09ab74646266f0b555103b3bb8dfe5"><td class="memItemLeft" align="right" valign="top">LWS_VISIBLE LWS_EXTERN unsigned char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__sha.html#ga7b09ab74646266f0b555103b3bb8dfe5">lws_SHA1</a> (const unsigned char *d, size_t n, unsigned char *md)</td></tr>
- <tr class="separator:ga7b09ab74646266f0b555103b3bb8dfe5"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:gaf39765e4a3b413efb65e4698b2ec3575"><td class="memItemLeft" align="right" valign="top">LWS_VISIBLE LWS_EXTERN int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__sha.html#gaf39765e4a3b413efb65e4698b2ec3575">lws_b64_encode_string</a> (const char *in, int in_len, char *out, int out_size)</td></tr>
- <tr class="separator:gaf39765e4a3b413efb65e4698b2ec3575"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ga66316e6a5a0644a09d5a10e919dfdd8d"><td class="memItemLeft" align="right" valign="top">LWS_VISIBLE LWS_EXTERN int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__sha.html#ga66316e6a5a0644a09d5a10e919dfdd8d">lws_b64_decode_string</a> (const char *in, char *out, int out_size)</td></tr>
- <tr class="separator:ga66316e6a5a0644a09d5a10e919dfdd8d"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <h2>SHA and B64 helpers</h2>
- <p>These provide SHA-1 and B64 helper apis </p>
- <h2 class="groupheader">Function Documentation</h2>
- <a class="anchor" id="ga66316e6a5a0644a09d5a10e919dfdd8d"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">LWS_VISIBLE LWS_EXTERN int lws_b64_decode_string </td>
- <td>(</td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>in</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">char * </td>
- <td class="paramname"><em>out</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>out_size</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p><code>#include <<a class="el" href="libwebsockets_8h.html">lib/libwebsockets.h</a>></code></p>
- <p><a class="el" href="group__sha.html#ga66316e6a5a0644a09d5a10e919dfdd8d">lws_b64_decode_string()</a>: decode a string from base 64</p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">in</td><td>incoming buffer </td></tr>
- <tr><td class="paramname">out</td><td>result buffer </td></tr>
- <tr><td class="paramname">out_size</td><td>length of result buffer</td></tr>
- </table>
- </dd>
- </dl>
- <p>Decodes a string using b64 </p>
- </div>
- </div>
- <a class="anchor" id="gaf39765e4a3b413efb65e4698b2ec3575"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">LWS_VISIBLE LWS_EXTERN int lws_b64_encode_string </td>
- <td>(</td>
- <td class="paramtype">const char * </td>
- <td class="paramname"><em>in</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>in_len</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">char * </td>
- <td class="paramname"><em>out</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>out_size</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p><code>#include <<a class="el" href="libwebsockets_8h.html">lib/libwebsockets.h</a>></code></p>
- <p><a class="el" href="group__sha.html#gaf39765e4a3b413efb65e4698b2ec3575">lws_b64_encode_string()</a>: encode a string into base 64</p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">in</td><td>incoming buffer </td></tr>
- <tr><td class="paramname">in_len</td><td>length of incoming buffer </td></tr>
- <tr><td class="paramname">out</td><td>result buffer </td></tr>
- <tr><td class="paramname">out_size</td><td>length of result buffer</td></tr>
- </table>
- </dd>
- </dl>
- <p>Encodes a string using b64 </p>
- </div>
- </div>
- <a class="anchor" id="ga7b09ab74646266f0b555103b3bb8dfe5"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">LWS_VISIBLE LWS_EXTERN unsigned char* lws_SHA1 </td>
- <td>(</td>
- <td class="paramtype">const unsigned char * </td>
- <td class="paramname"><em>d</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">size_t </td>
- <td class="paramname"><em>n</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">unsigned char * </td>
- <td class="paramname"><em>md</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p><code>#include <<a class="el" href="libwebsockets_8h.html">lib/libwebsockets.h</a>></code></p>
- <p><a class="el" href="group__sha.html#ga7b09ab74646266f0b555103b3bb8dfe5">lws_SHA1()</a>: make a SHA-1 digest of a buffer</p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">d</td><td>incoming buffer </td></tr>
- <tr><td class="paramname">n</td><td>length of incoming buffer </td></tr>
- <tr><td class="paramname">md</td><td>buffer for message digest (must be >= 20 bytes)</td></tr>
- </table>
- </dd>
- </dl>
- <p>Reduces any size buffer into a 20-byte SHA-1 hash. </p>
- </div>
- </div>
- </div><!-- contents -->
- </div><!-- doc-content -->
- <!-- start footer part -->
- <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
- <ul>
- <li class="footer">Generated by
- <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
- </ul>
- </div>
- </body>
- </html>
|