Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > ee8fafc31a7ba3ce3ae4499cedf4e1bc > files > 76

libssh-devel-0.5.5-1.fc18.i686.rpm

<!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>libssh: The SSH string functions</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="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 style="padding-left: 0.5em;">
   <div id="projectname">libssh
   &#160;<span id="projectnumber">0.5.5</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
  <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="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">The SSH string functions<div class="ingroups"><a class="el" href="group__libssh.html">The libssh API</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>String manipulations used in libssh.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gaca1c58e13e7bdb72ea8410592fa0cbf6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libssh__string.html#gaca1c58e13e7bdb72ea8410592fa0cbf6">ssh_string_burn</a> (struct ssh_string_struct *s)</td></tr>
<tr class="memdesc:gaca1c58e13e7bdb72ea8410592fa0cbf6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy the data in a string so it couldn't appear in a core dump.  <a href="#gaca1c58e13e7bdb72ea8410592fa0cbf6">More...</a><br/></td></tr>
<tr class="separator:gaca1c58e13e7bdb72ea8410592fa0cbf6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac71b531c19ead0990fd23d0b28d92e02"><td class="memItemLeft" align="right" valign="top">struct ssh_string_struct *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libssh__string.html#gac71b531c19ead0990fd23d0b28d92e02">ssh_string_copy</a> (struct ssh_string_struct *s)</td></tr>
<tr class="memdesc:gac71b531c19ead0990fd23d0b28d92e02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy a string, return a newly allocated string.  <a href="#gac71b531c19ead0990fd23d0b28d92e02">More...</a><br/></td></tr>
<tr class="separator:gac71b531c19ead0990fd23d0b28d92e02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf01673d22adbff92c88bcb6e30946ea6"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libssh__string.html#gaf01673d22adbff92c88bcb6e30946ea6">ssh_string_data</a> (struct ssh_string_struct *s)</td></tr>
<tr class="memdesc:gaf01673d22adbff92c88bcb6e30946ea6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the payload of the string.  <a href="#gaf01673d22adbff92c88bcb6e30946ea6">More...</a><br/></td></tr>
<tr class="separator:gaf01673d22adbff92c88bcb6e30946ea6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad5626768334f4837c4a31e5b4a68d130"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libssh__string.html#gad5626768334f4837c4a31e5b4a68d130">ssh_string_fill</a> (struct ssh_string_struct *s, const void *data, size_t len)</td></tr>
<tr class="memdesc:gad5626768334f4837c4a31e5b4a68d130"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fill a string with given data.  <a href="#gad5626768334f4837c4a31e5b4a68d130">More...</a><br/></td></tr>
<tr class="separator:gad5626768334f4837c4a31e5b4a68d130"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gacd9c4eb69f7ecfdcf709deb8dde6a5a8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libssh__string.html#gacd9c4eb69f7ecfdcf709deb8dde6a5a8">ssh_string_free</a> (struct ssh_string_struct *s)</td></tr>
<tr class="memdesc:gacd9c4eb69f7ecfdcf709deb8dde6a5a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deallocate a SSH string object.  <a href="#gacd9c4eb69f7ecfdcf709deb8dde6a5a8">More...</a><br/></td></tr>
<tr class="separator:gacd9c4eb69f7ecfdcf709deb8dde6a5a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafc10700722d6cafc468c2ee97585449a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libssh__string.html#gafc10700722d6cafc468c2ee97585449a">ssh_string_free_char</a> (char *s)</td></tr>
<tr class="memdesc:gafc10700722d6cafc468c2ee97585449a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deallocate a char string object.  <a href="#gafc10700722d6cafc468c2ee97585449a">More...</a><br/></td></tr>
<tr class="separator:gafc10700722d6cafc468c2ee97585449a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga4154ea16ba2dc5bd5dcb2579686aaac2"><td class="memItemLeft" align="right" valign="top">struct ssh_string_struct *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libssh__string.html#ga4154ea16ba2dc5bd5dcb2579686aaac2">ssh_string_from_char</a> (const char *what)</td></tr>
<tr class="memdesc:ga4154ea16ba2dc5bd5dcb2579686aaac2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a ssh string using a C string.  <a href="#ga4154ea16ba2dc5bd5dcb2579686aaac2">More...</a><br/></td></tr>
<tr class="separator:ga4154ea16ba2dc5bd5dcb2579686aaac2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga331553369afbfcb4f5300729ed65d0fe"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libssh__string.html#ga331553369afbfcb4f5300729ed65d0fe">ssh_string_len</a> (struct ssh_string_struct *s)</td></tr>
<tr class="memdesc:ga331553369afbfcb4f5300729ed65d0fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the size of a SSH string.  <a href="#ga331553369afbfcb4f5300729ed65d0fe">More...</a><br/></td></tr>
<tr class="separator:ga331553369afbfcb4f5300729ed65d0fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaedd3d6073cee901aaa288712896d0f28"><td class="memItemLeft" align="right" valign="top">struct ssh_string_struct *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libssh__string.html#gaedd3d6073cee901aaa288712896d0f28">ssh_string_new</a> (size_t size)</td></tr>
<tr class="memdesc:gaedd3d6073cee901aaa288712896d0f28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new SSH String object.  <a href="#gaedd3d6073cee901aaa288712896d0f28">More...</a><br/></td></tr>
<tr class="separator:gaedd3d6073cee901aaa288712896d0f28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga65cbd5f2c5f02599c1c285efd1f06351"><td class="memItemLeft" align="right" valign="top">char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__libssh__string.html#ga65cbd5f2c5f02599c1c285efd1f06351">ssh_string_to_char</a> (struct ssh_string_struct *s)</td></tr>
<tr class="memdesc:ga65cbd5f2c5f02599c1c285efd1f06351"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a SSH string to a C nul-terminated string.  <a href="#ga65cbd5f2c5f02599c1c285efd1f06351">More...</a><br/></td></tr>
<tr class="separator:ga65cbd5f2c5f02599c1c285efd1f06351"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>String manipulations used in libssh. </p>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gaca1c58e13e7bdb72ea8410592fa0cbf6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ssh_string_burn </td>
          <td>(</td>
          <td class="paramtype">struct ssh_string_struct *&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Destroy the data in a string so it couldn't appear in a core dump. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>The string to burn. </td></tr>
  </table>
  </dd>
</dl>

<p>References <a class="el" href="group__libssh__string.html#ga331553369afbfcb4f5300729ed65d0fe">ssh_string_len()</a>.</p>

<p>Referenced by <a class="el" href="group__libssh__auth.html#gae11c083974e8bfb0ebeb7c6fb9a06baf">publickey_from_privatekey()</a>, and <a class="el" href="group__libssh__auth.html#ga50c0c150f8c4703e7ee49b3e3e3ca215">ssh_userauth_password()</a>.</p>

</div>
</div>
<a class="anchor" id="gac71b531c19ead0990fd23d0b28d92e02"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">struct ssh_string_struct* ssh_string_copy </td>
          <td>(</td>
          <td class="paramtype">struct ssh_string_struct *&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Copy a string, return a newly allocated string. </p>
<p>The caller has to free the string.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>String to copy.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Newly allocated copy of the string, NULL on error. </dd></dl>

</div>
</div>
<a class="anchor" id="gaf01673d22adbff92c88bcb6e30946ea6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* ssh_string_data </td>
          <td>(</td>
          <td class="paramtype">struct ssh_string_struct *&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the payload of the string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>The string to get the data from.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Return the data of the string or NULL on error. </dd></dl>

<p>Referenced by <a class="el" href="group__libssh__auth.html#gae11c083974e8bfb0ebeb7c6fb9a06baf">publickey_from_privatekey()</a>.</p>

</div>
</div>
<a class="anchor" id="gad5626768334f4837c4a31e5b4a68d130"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ssh_string_fill </td>
          <td>(</td>
          <td class="paramtype">struct ssh_string_struct *&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Fill a string with given data. </p>
<p>The string should be big enough.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>An allocated string to fill with data.</td></tr>
    <tr><td class="paramname">data</td><td>The data to fill the string with.</td></tr>
    <tr><td class="paramname">len</td><td>Size of data.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success, &lt; 0 on error. </dd></dl>

<p>Referenced by <a class="el" href="group__libssh__auth.html#ga40c8ac05358aa941496fd1243ac9ee00">publickey_from_file()</a>, <a class="el" href="group__libssh__auth.html#gae11c083974e8bfb0ebeb7c6fb9a06baf">publickey_from_privatekey()</a>, and <a class="el" href="group__libssh__auth.html#ga1bd48caa6d4fc91a0cbedd04ba56f901">publickey_to_string()</a>.</p>

</div>
</div>
<a class="anchor" id="gacd9c4eb69f7ecfdcf709deb8dde6a5a8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ssh_string_free </td>
          <td>(</td>
          <td class="paramtype">struct ssh_string_struct *&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Deallocate a SSH string object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>The SSH string to delete. </td></tr>
  </table>
  </dd>
</dl>

<p>Referenced by <a class="el" href="group__libssh__auth.html#gae11c083974e8bfb0ebeb7c6fb9a06baf">publickey_from_privatekey()</a>, <a class="el" href="group__libssh__auth.html#ga1bd48caa6d4fc91a0cbedd04ba56f901">publickey_to_string()</a>, <a class="el" href="group__libssh__channel.html#gae86b0704a1f2bdebb268b55567f7f47b">ssh_channel_open_forward()</a>, <a class="el" href="group__libssh__channel.html#ga7aede2f9af4c494ff9e41fc08a4572f1">ssh_channel_request_env()</a>, <a class="el" href="group__libssh__channel.html#ga567d509183ade0a77190f390e2b5747d">ssh_channel_request_exec()</a>, <a class="el" href="group__libssh__channel.html#gabb175414352256e1602286e0ab50886c">ssh_channel_request_pty_size()</a>, <a class="el" href="group__libssh__channel.html#gaa98315fca818b561970a6950683f4053">ssh_channel_request_send_signal()</a>, <a class="el" href="group__libssh__channel.html#ga06024b070f9b2a3d6964b79ae36695b7">ssh_channel_request_subsystem()</a>, <a class="el" href="group__libssh__channel.html#gadfa34624c28164bd73453cd04aa64c1f">ssh_channel_request_x11()</a>, <a class="el" href="group__libssh__session.html#ga0f048a4c0dbe02cfb7e9c5b6d0db0f27">ssh_disconnect()</a>, <a class="el" href="group__libssh__channel.html#gac474d071d80e725c8b5633cb1d35c010">ssh_forward_cancel()</a>, <a class="el" href="group__libssh__channel.html#ga041a495f0230bb017cdf7459e6773664">ssh_forward_listen()</a>, <a class="el" href="group__libssh__auth.html#ga5cc49db459d6e27c8645a20bbd0f5f88">ssh_userauth_agent_pubkey()</a>, <a class="el" href="group__libssh__auth.html#gad07655f2c742ce68271422197cf2acda">ssh_userauth_autopubkey()</a>, <a class="el" href="group__libssh__auth.html#ga58e7c265236edbc97a2f117d3f23b4dd">ssh_userauth_none()</a>, <a class="el" href="group__libssh__auth.html#ga78b485bf5c4e68ddfbc25f17de8b6521">ssh_userauth_offer_pubkey()</a>, <a class="el" href="group__libssh__auth.html#ga50c0c150f8c4703e7ee49b3e3e3ca215">ssh_userauth_password()</a>, <a class="el" href="group__libssh__auth.html#ga60e80b5020e6182da7790c1f0cb220c1">ssh_userauth_privatekey_file()</a>, and <a class="el" href="group__libssh__auth.html#ga18f0c63c75b9af6c28c032e93628a7c5">ssh_userauth_pubkey()</a>.</p>

</div>
</div>
<a class="anchor" id="gafc10700722d6cafc468c2ee97585449a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ssh_string_free_char </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Deallocate a char string object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>The string to delete. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ga4154ea16ba2dc5bd5dcb2579686aaac2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">struct ssh_string_struct* ssh_string_from_char </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>what</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a ssh string using a C string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">what</td><td>The source 0-terminated C string.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The newly allocated string, NULL on error with errno set.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The nul byte is not copied nor counted in the ouput string. </dd></dl>

<p>Referenced by <a class="el" href="group__libssh__auth.html#ga1bd48caa6d4fc91a0cbedd04ba56f901">publickey_to_string()</a>, <a class="el" href="group__libssh__channel.html#gae86b0704a1f2bdebb268b55567f7f47b">ssh_channel_open_forward()</a>, <a class="el" href="group__libssh__channel.html#ga7aede2f9af4c494ff9e41fc08a4572f1">ssh_channel_request_env()</a>, <a class="el" href="group__libssh__channel.html#ga567d509183ade0a77190f390e2b5747d">ssh_channel_request_exec()</a>, <a class="el" href="group__libssh__channel.html#gabb175414352256e1602286e0ab50886c">ssh_channel_request_pty_size()</a>, <a class="el" href="group__libssh__channel.html#gaa98315fca818b561970a6950683f4053">ssh_channel_request_send_signal()</a>, <a class="el" href="group__libssh__channel.html#ga06024b070f9b2a3d6964b79ae36695b7">ssh_channel_request_subsystem()</a>, <a class="el" href="group__libssh__channel.html#gadfa34624c28164bd73453cd04aa64c1f">ssh_channel_request_x11()</a>, <a class="el" href="group__libssh__session.html#ga0f048a4c0dbe02cfb7e9c5b6d0db0f27">ssh_disconnect()</a>, <a class="el" href="group__libssh__channel.html#gac474d071d80e725c8b5633cb1d35c010">ssh_forward_cancel()</a>, <a class="el" href="group__libssh__channel.html#ga041a495f0230bb017cdf7459e6773664">ssh_forward_listen()</a>, <a class="el" href="group__libssh__auth.html#ga5cc49db459d6e27c8645a20bbd0f5f88">ssh_userauth_agent_pubkey()</a>, <a class="el" href="group__libssh__auth.html#ga58e7c265236edbc97a2f117d3f23b4dd">ssh_userauth_none()</a>, <a class="el" href="group__libssh__auth.html#ga78b485bf5c4e68ddfbc25f17de8b6521">ssh_userauth_offer_pubkey()</a>, <a class="el" href="group__libssh__auth.html#ga50c0c150f8c4703e7ee49b3e3e3ca215">ssh_userauth_password()</a>, and <a class="el" href="group__libssh__auth.html#ga18f0c63c75b9af6c28c032e93628a7c5">ssh_userauth_pubkey()</a>.</p>

</div>
</div>
<a class="anchor" id="ga331553369afbfcb4f5300729ed65d0fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">size_t ssh_string_len </td>
          <td>(</td>
          <td class="paramtype">struct ssh_string_struct *&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the size of a SSH string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>The the input SSH string.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The size of the content of the string, 0 on error. </dd></dl>

<p>Referenced by <a class="el" href="group__libssh__auth.html#gae11c083974e8bfb0ebeb7c6fb9a06baf">publickey_from_privatekey()</a>, <a class="el" href="group__libssh__session.html#gaf8ff0e2236d54d964a82f68d7323a741">ssh_get_pubkey_hash()</a>, <a class="el" href="group__libssh__auth.html#ga21dbd716d13837aa8c70cb3603977606">ssh_publickey_to_file()</a>, <a class="el" href="group__libssh__string.html#gaca1c58e13e7bdb72ea8410592fa0cbf6">ssh_string_burn()</a>, <a class="el" href="group__libssh__string.html#ga65cbd5f2c5f02599c1c285efd1f06351">ssh_string_to_char()</a>, and <a class="el" href="group__libssh__session.html#gaf61a9cfdc40c76ffce9f9a8543755d36">ssh_write_knownhost()</a>.</p>

</div>
</div>
<a class="anchor" id="gaedd3d6073cee901aaa288712896d0f28"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">struct ssh_string_struct* ssh_string_new </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">read</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a new SSH String object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">size</td><td>The size of the string.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The newly allocated string, NULL on error. </dd></dl>

<p>Referenced by <a class="el" href="group__libssh__auth.html#ga40c8ac05358aa941496fd1243ac9ee00">publickey_from_file()</a>, <a class="el" href="group__libssh__auth.html#gae11c083974e8bfb0ebeb7c6fb9a06baf">publickey_from_privatekey()</a>, and <a class="el" href="group__libssh__auth.html#ga1bd48caa6d4fc91a0cbedd04ba56f901">publickey_to_string()</a>.</p>

</div>
</div>
<a class="anchor" id="ga65cbd5f2c5f02599c1c285efd1f06351"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* ssh_string_to_char </td>
          <td>(</td>
          <td class="paramtype">struct ssh_string_struct *&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a SSH string to a C nul-terminated string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">s</td><td>The SSH input string.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An allocated string pointer, NULL on error with errno set.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>If the input SSH string contains zeroes, some parts of the output string may not be readable with regular libc functions. </dd></dl>

<p>References <a class="el" href="group__libssh__string.html#ga331553369afbfcb4f5300729ed65d0fe">ssh_string_len()</a>.</p>

<p>Referenced by <a class="el" href="group__libssh__session.html#ga89864d4d5cc6d3d6ef1c39652f2a688f">ssh_get_issue_banner()</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3.1
</small></address>
</body>
</html>