libssh
0.5.4
|
String manipulations used in libssh. More...
Functions | |
void | ssh_string_burn (struct ssh_string_struct *s) |
Destroy the data in a string so it couldn't appear in a core dump. More... | |
struct ssh_string_struct * | ssh_string_copy (struct ssh_string_struct *s) |
Copy a string, return a newly allocated string. More... | |
void * | ssh_string_data (struct ssh_string_struct *s) |
Get the payload of the string. More... | |
int | ssh_string_fill (struct ssh_string_struct *s, const void *data, size_t len) |
Fill a string with given data. More... | |
void | ssh_string_free (struct ssh_string_struct *s) |
Deallocate a SSH string object. More... | |
void | ssh_string_free_char (char *s) |
Deallocate a char string object. More... | |
struct ssh_string_struct * | ssh_string_from_char (const char *what) |
Create a ssh string using a C string. More... | |
size_t | ssh_string_len (struct ssh_string_struct *s) |
Return the size of a SSH string. More... | |
struct ssh_string_struct * | ssh_string_new (size_t size) |
Create a new SSH String object. More... | |
char * | ssh_string_to_char (struct ssh_string_struct *s) |
Convert a SSH string to a C nul-terminated string. More... | |
String manipulations used in libssh.
void ssh_string_burn | ( | struct ssh_string_struct * | s | ) |
Destroy the data in a string so it couldn't appear in a core dump.
[in] | s | The string to burn. |
References ssh_string_len().
Referenced by publickey_from_privatekey(), and ssh_userauth_password().
|
read |
Copy a string, return a newly allocated string.
The caller has to free the string.
[in] | s | String to copy. |
void* ssh_string_data | ( | struct ssh_string_struct * | s | ) |
Get the payload of the string.
s | The string to get the data from. |
Referenced by publickey_from_privatekey().
int ssh_string_fill | ( | struct ssh_string_struct * | s, |
const void * | data, | ||
size_t | len | ||
) |
Fill a string with given data.
The string should be big enough.
s | An allocated string to fill with data. |
data | The data to fill the string with. |
len | Size of data. |
Referenced by publickey_from_file(), publickey_from_privatekey(), and publickey_to_string().
void ssh_string_free | ( | struct ssh_string_struct * | s | ) |
Deallocate a SSH string object.
[in] | s | The SSH string to delete. |
Referenced by publickey_from_privatekey(), publickey_to_string(), ssh_channel_open_forward(), ssh_channel_request_env(), ssh_channel_request_exec(), ssh_channel_request_pty_size(), ssh_channel_request_send_signal(), ssh_channel_request_subsystem(), ssh_channel_request_x11(), ssh_disconnect(), ssh_forward_cancel(), ssh_forward_listen(), ssh_userauth_agent_pubkey(), ssh_userauth_autopubkey(), ssh_userauth_none(), ssh_userauth_offer_pubkey(), ssh_userauth_password(), ssh_userauth_privatekey_file(), and ssh_userauth_pubkey().
void ssh_string_free_char | ( | char * | s | ) |
Deallocate a char string object.
[in] | s | The string to delete. |
|
read |
Create a ssh string using a C string.
[in] | what | The source 0-terminated C string. |
Referenced by publickey_to_string(), ssh_channel_open_forward(), ssh_channel_request_env(), ssh_channel_request_exec(), ssh_channel_request_pty_size(), ssh_channel_request_send_signal(), ssh_channel_request_subsystem(), ssh_channel_request_x11(), ssh_disconnect(), ssh_forward_cancel(), ssh_forward_listen(), ssh_userauth_agent_pubkey(), ssh_userauth_none(), ssh_userauth_offer_pubkey(), ssh_userauth_password(), and ssh_userauth_pubkey().
size_t ssh_string_len | ( | struct ssh_string_struct * | s | ) |
Return the size of a SSH string.
[in] | s | The the input SSH string. |
Referenced by publickey_from_privatekey(), ssh_get_pubkey_hash(), ssh_publickey_to_file(), ssh_string_burn(), ssh_string_to_char(), and ssh_write_knownhost().
|
read |
Create a new SSH String object.
[in] | size | The size of the string. |
Referenced by publickey_from_file(), publickey_from_privatekey(), and publickey_to_string().
char* ssh_string_to_char | ( | struct ssh_string_struct * | s | ) |
Convert a SSH string to a C nul-terminated string.
[in] | s | The SSH input string. |
References ssh_string_len().
Referenced by ssh_get_issue_banner().