diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/wee-network.c | 2 | ||||
-rw-r--r-- | src/core/wee-secure-config.c | 4 | ||||
-rw-r--r-- | src/core/wee-secure.c | 6 | ||||
-rw-r--r-- | src/core/wee-string.c | 12 | ||||
-rw-r--r-- | src/core/wee-string.h | 12 |
5 files changed, 18 insertions, 18 deletions
diff --git a/src/core/wee-network.c b/src/core/wee-network.c index dcb8e174d..8fd45d690 100644 --- a/src/core/wee-network.c +++ b/src/core/wee-network.c @@ -267,7 +267,7 @@ network_pass_httpproxy (struct t_proxy *proxy, int sock, const char *address, snprintf (authbuf, sizeof (authbuf), "%s:%s", username, password); free (username); free (password); - if (string_encode_base64 (authbuf, strlen (authbuf), authbuf_base64) < 0) + if (string_base64_encode (authbuf, strlen (authbuf), authbuf_base64) < 0) return 0; length = snprintf (buffer, sizeof (buffer), "CONNECT %s:%d HTTP/1.0\r\nProxy-Authorization: " diff --git a/src/core/wee-secure-config.c b/src/core/wee-secure-config.c index 5e1332019..4ee1f1112 100644 --- a/src/core/wee-secure-config.c +++ b/src/core/wee-secure-config.c @@ -274,7 +274,7 @@ secure_config_data_read_cb (const void *pointer, void *data, if (!buffer) return WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE; - length_buffer = string_decode_base16 (value, buffer); + length_buffer = string_base16_decode (value, buffer); while (1) { decrypted = NULL; @@ -370,7 +370,7 @@ secure_config_data_write_map_cb (void *data, buffer_base16 = malloc ((length_buffer * 2) + 1); if (buffer_base16) { - if (string_encode_base16 (buffer, length_buffer, + if (string_base16_encode (buffer, length_buffer, buffer_base16) >= 0) { config_file_write_line (config_file, key, diff --git a/src/core/wee-secure.c b/src/core/wee-secure.c index b9abe62c9..84680bec8 100644 --- a/src/core/wee-secure.c +++ b/src/core/wee-secure.c @@ -466,7 +466,7 @@ secure_decrypt_data_not_decrypted (const char *passphrase) buffer = malloc (strlen (value) + 1); if (buffer) { - length_buffer = string_decode_base16 (value, buffer); + length_buffer = string_base16_decode (value, buffer); decrypted = NULL; length_decrypted = 0; rc = secure_decrypt_data ( @@ -595,7 +595,7 @@ secure_totp_generate (const char *secret_base32, time_t totp_time, int digits) if (!secret) goto error; - length_secret = string_decode_base32 (secret_base32, secret); + length_secret = string_base32_decode (secret_base32, secret); if (length_secret < 0) goto error; @@ -654,7 +654,7 @@ secure_totp_validate (const char *secret_base32, time_t totp_time, int window, if (!secret) goto error; - length_secret = string_decode_base32 (secret_base32, secret); + length_secret = string_base32_decode (secret_base32, secret); if (length_secret < 0) goto error; diff --git a/src/core/wee-string.c b/src/core/wee-string.c index 32afd060e..016f93f04 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -2707,7 +2707,7 @@ string_format_size (unsigned long long size) */ int -string_encode_base16 (const char *from, int length, char *to) +string_base16_encode (const char *from, int length, char *to) { int i, count; const char *hexa = "0123456789ABCDEF"; @@ -2734,7 +2734,7 @@ string_encode_base16 (const char *from, int length, char *to) */ int -string_decode_base16 (const char *from, char *to) +string_base16_decode (const char *from, char *to) { int length, i, pos, count; unsigned char value; @@ -2803,7 +2803,7 @@ string_decode_base16 (const char *from, char *to) */ int -string_encode_base32 (const char *from, int length, char *to) +string_base32_encode (const char *from, int length, char *to) { unsigned char base32_table[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; int count, value, next, bits_left, pad, index; @@ -2880,7 +2880,7 @@ string_encode_base32 (const char *from, int length, char *to) */ int -string_decode_base32 (const char *from, char *to) +string_base32_decode (const char *from, char *to) { const char *ptr_from; int value, bits_left, count; @@ -2956,7 +2956,7 @@ string_convbase64_8x3_to_6x4 (const char *from, char *to) */ int -string_encode_base64 (const char *from, int length, char *to) +string_base64_encode (const char *from, int length, char *to) { const char *ptr_from; char rest[3]; @@ -3027,7 +3027,7 @@ string_convbase64_6x4_to_8x3 (const unsigned char *from, unsigned char *to) */ int -string_decode_base64 (const char *from, char *to) +string_base64_decode (const char *from, char *to) { const char *ptr_from; int length, to_length, i; diff --git a/src/core/wee-string.h b/src/core/wee-string.h index 4709f73d7..6d059f8fa 100644 --- a/src/core/wee-string.h +++ b/src/core/wee-string.h @@ -105,12 +105,12 @@ extern char *string_iconv_from_internal (const char *charset, const char *string); extern int string_fprintf (FILE *file, const char *data, ...); extern char *string_format_size (unsigned long long size); -extern int string_encode_base16 (const char *from, int length, char *to); -extern int string_decode_base16 (const char *from, char *to); -extern int string_encode_base32 (const char *from, int length, char *to); -extern int string_decode_base32 (const char *from, char *to); -extern int string_encode_base64 (const char *from, int length, char *to); -extern int string_decode_base64 (const char *from, char *to); +extern int string_base16_encode (const char *from, int length, char *to); +extern int string_base16_decode (const char *from, char *to); +extern int string_base32_encode (const char *from, int length, char *to); +extern int string_base32_decode (const char *from, char *to); +extern int string_base64_encode (const char *from, int length, char *to); +extern int string_base64_decode (const char *from, char *to); extern char *string_hex_dump (const char *data, int data_size, int bytes_per_line, const char *prefix, const char *suffix); |