string manipulations More...
Functions | |
void | string_burn (struct ssh_string_struct *s) |
destroy data in a string so it couldn't appear in a core dump | |
struct ssh_string_struct * | string_copy (struct ssh_string_struct *s) |
Copy a string, return a newly allocated string. | |
void * | string_data (struct ssh_string_struct *s) |
Get the payload of the string. | |
int | string_fill (struct ssh_string_struct *s, const void *data, size_t len) |
Fill a string with given data. | |
void | string_free (struct ssh_string_struct *s) |
deallocate a STRING object | |
struct ssh_string_struct * | string_from_char (const char *what) |
Creates a ssh stream using a C string. | |
size_t | string_len (struct ssh_string_struct *s) |
returns the size of a SSH string | |
struct ssh_string_struct * | string_new (size_t size) |
Creates a new SSH String object. | |
char * | string_to_char (struct ssh_string_struct *s) |
convert a SSH string to a C nul-terminated string |
string manipulations
void string_burn | ( | struct ssh_string_struct * | s | ) |
destroy data in a string so it couldn't appear in a core dump
s | string to burn |
References string_len().
Referenced by publickey_from_privatekey(), and ssh_userauth_password().
struct ssh_string_struct* string_copy | ( | struct ssh_string_struct * | s | ) | [read] |
Copy a string, return a newly allocated string.
The caller has to free the string.
s | String to copy. |
void* 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 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 string_free | ( | struct ssh_string_struct * | s | ) |
deallocate a STRING object
s | String to delete |
Referenced by channel_forward_cancel(), channel_forward_listen(), channel_open_forward(), channel_request_env(), channel_request_exec(), channel_request_pty_size(), channel_request_send_signal(), channel_request_subsystem(), channel_request_x11(), publickey_from_privatekey(), publickey_to_string(), ssh_disconnect(), ssh_userauth_agent_pubkey(), ssh_userauth_autopubkey(), ssh_userauth_none(), ssh_userauth_offer_pubkey(), ssh_userauth_password(), and ssh_userauth_pubkey().
struct ssh_string_struct* string_from_char | ( | const char * | what | ) | [read] |
Creates a ssh stream using a C string.
what | source 0-terminated C string |
Referenced by channel_forward_cancel(), channel_forward_listen(), channel_open_forward(), channel_request_env(), channel_request_exec(), channel_request_pty_size(), channel_request_send_signal(), channel_request_subsystem(), channel_request_x11(), publickey_to_string(), ssh_disconnect(), ssh_userauth_agent_pubkey(), ssh_userauth_none(), ssh_userauth_offer_pubkey(), ssh_userauth_password(), and ssh_userauth_pubkey().
size_t string_len | ( | struct ssh_string_struct * | s | ) |
returns the size of a SSH string
s | the input SSH string |
Referenced by publickey_from_privatekey(), ssh_get_pubkey_hash(), ssh_publickey_to_file(), ssh_write_knownhost(), and string_burn().
struct ssh_string_struct* string_new | ( | size_t | size | ) | [read] |
Creates a new SSH String object.
size | size of the string |
Referenced by publickey_from_file(), publickey_from_privatekey(), and publickey_to_string().
char* string_to_char | ( | struct ssh_string_struct * | s | ) |
convert a SSH string to a C nul-terminated string
s | the input SSH string |
Referenced by ssh_get_issue_banner().