SSH Strings

string manipulations More...

Functions

void string_burn (STRING *s)
 destroy data in a string so it couldn't appear in a core dump
void string_free (STRING *s)
 deallocate a STRING object
STRING * string_from_char (const char *what)
 Creates a ssh stream using a C string.
int string_len (STRING *str)
 returns the size of a SSH string
STRING * string_new (unsigned int size)
 Creates a new SSH String object.
char * string_to_char (STRING *str)
 convert a SSH string to a C nul-terminated string

Detailed Description

string manipulations


Function Documentation

void string_burn ( STRING *  s  ) 

destroy data in a string so it couldn't appear in a core dump

Parameters:
s string to burn

void string_free ( STRING *  s  ) 

deallocate a STRING object

Parameters:
s String to delete

STRING* string_from_char ( const char *  what  ) 

Creates a ssh stream using a C string.

Parameters:
what source 0-terminated C string
Returns:
the newly allocated string.
Warning:
The nul byte is not copied nor counted in the ouput string.

int string_len ( STRING *  str  ) 

returns the size of a SSH string

Parameters:
str the input SSH string
Returns:
size of the content of str

STRING* string_new ( unsigned int  size  ) 

Creates a new SSH String object.

Parameters:
size size of the string
Returns:
the newly allocated string

char* string_to_char ( STRING *  str  ) 

convert a SSH string to a C nul-terminated string

Parameters:
str the input SSH string
Returns:
a malloc'ed string pointer.
Warning:
If the input SSH string contains zeroes, some parts of the output string may not be readable with regular libc functions.


Generated on Sun Aug 23 08:55:36 2009 for libssh by  doxygen 1.4.7