summaryrefslogtreecommitdiff
path: root/doc/it
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2024-01-14 14:27:26 +0100
committerSébastien Helleu <flashcode@flashtux.org>2024-02-01 21:39:21 +0100
commitf126255d6ab62704d96a1fe490661969afc5a51e (patch)
treeb637e98f51e6027fce4fb72cd4db2af4f128c532 /doc/it
parent6cfb31c306b9deb120a9fb5c564a1456a72af665 (diff)
downloadweechat-f126255d6ab62704d96a1fe490661969afc5a51e.zip
core: add support of base64url in encode/decode functions (issue #2066)
Diffstat (limited to 'doc/it')
-rw-r--r--doc/it/weechat_plugin_api.it.adoc24
1 files changed, 12 insertions, 12 deletions
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc
index 9a9da605f..fa3ad3c01 100644
--- a/doc/it/weechat_plugin_api.it.adoc
+++ b/doc/it/weechat_plugin_api.it.adoc
@@ -2493,7 +2493,7 @@ str = weechat.string_remove_color(my_string, "?")
==== string_base_encode
-_WeeChat ≥ 2.4._
+_WeeChat ≥ 2.4, updated in 4.3.0._
// TRANSLATION MISSING
Encode a string in base 16, 32, or 64.
@@ -2502,13 +2502,13 @@ Prototipo:
[source,c]
----
-int weechat_string_base_encode (int base, const char *from, int length, char *to);
+int weechat_string_base_encode (const char *base, const char *from, int length, char *to);
----
Argomenti:
// TRANSLATION MISSING
-* _base_: 16, 32, or 64
+* _base_: "16", "32", "64", or "64url"
* _from_: stringa da codificare
* _length_: lunghezza della stringa da codificare (ad esempio `strlen(from)`)
* _to_: puntatore alla stringa per memorizzare il risultato (deve essere
@@ -2526,11 +2526,11 @@ Esempio in C:
----
char *string = "abcdefgh", result[128];
int length;
-length = weechat_string_base_encode (16, string, strlen (string), result);
+length = weechat_string_base_encode ("16", string, strlen (string), result);
/* length == 16, result == "6162636465666768" */
-length = weechat_string_base_encode (32, string, strlen (string), result);
+length = weechat_string_base_encode ("32", string, strlen (string), result);
/* length == 16, result == "MFRGGZDFMZTWQ===" */
-length = weechat_string_base_encode (64, string, strlen (string), result);
+length = weechat_string_base_encode ("64", string, strlen (string), result);
/* length == 12, result == "YWJjZGVmZ2g=" */
----
@@ -2539,7 +2539,7 @@ Questa funzione non è disponibile nelle API per lo scripting.
==== string_base_decode
-_WeeChat ≥ 2.4._
+_WeeChat ≥ 2.4, updated in 4.3.0._
// TRANSLATION MISSING
Decode a string encoded in base 16, 32, or 64.
@@ -2548,13 +2548,13 @@ Prototipo:
[source,c]
----
-int weechat_string_base_decode (int base, const char *from, char *to);
+int weechat_string_base_decode (const char *base, const char *from, char *to);
----
Argomenti:
// TRANSLATION MISSING
-* _base_: 16, 32, or 64
+* _base_: "16", "32", "64" or "64url"
* _from_: stringa da decodificare
* _to_: puntatore alla stringa per memorizzare il risultato (deve essere
sufficientemente lunga, il risultato è più lungo della stringa iniziale)
@@ -2571,11 +2571,11 @@ Esempio in C:
----
char result[128];
int length;
-length = weechat_string_base_decode (16, "6162636465666768", result);
+length = weechat_string_base_decode ("16", "6162636465666768", result);
/* length == 8, result == "abcdefgh" */
-length = weechat_string_base_decode (32, "MFRGGZDFMZTWQ===", result);
+length = weechat_string_base_decode ("32", "MFRGGZDFMZTWQ===", result);
/* length == 8, result == "abcdefgh" */
-length = weechat_string_base_decode (64, "YWJjZGVmZ2g=", result);
+length = weechat_string_base_decode ("64", "YWJjZGVmZ2g=", result);
/* length == 8, result == "abcdefgh" */
----