summaryrefslogtreecommitdiff
path: root/doc/it/weechat_plugin_api.it.adoc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2022-08-16 21:25:30 +0200
committerSébastien Helleu <flashcode@flashtux.org>2022-08-16 21:33:50 +0200
commit0090695f7d79efa4f50398b55bc59317d1de1d75 (patch)
tree9c1adbf669c3cdca080bd8aea4cbb9a119bb2d18 /doc/it/weechat_plugin_api.it.adoc
parente61441081520bcada6de699229ce9af241302665 (diff)
downloadweechat-0090695f7d79efa4f50398b55bc59317d1de1d75.zip
api: add function crypto_hash_file
Diffstat (limited to 'doc/it/weechat_plugin_api.it.adoc')
-rw-r--r--doc/it/weechat_plugin_api.it.adoc44
1 files changed, 44 insertions, 0 deletions
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc
index c0d0d81c6..26cdf1144 100644
--- a/doc/it/weechat_plugin_api.it.adoc
+++ b/doc/it/weechat_plugin_api.it.adoc
@@ -3895,6 +3895,50 @@ rc = weechat_crypto_hash (data, strlen (data), "sha256", hash, &hash_size);
Questa funzione non è disponibile nelle API per lo scripting.
// TRANSLATION MISSING
+==== crypto_hash_file
+
+_WeeChat ≥ 3.7._
+
+Compute hash of a file.
+
+Prototipo:
+
+[source,c]
+----
+int weechat_crypto_hash_file (const char *filename, const char *hash_algo,
+ void *hash, int *hash_size);
+----
+
+Argomenti:
+
+* _filename_: percorso e nome file
+* _hash_algo_: the hash algorithm, see table in function
+ <<crypto_hash_algorithms,crypto_hash>>
+* _hash_: pointer to the hash variable, which is used to store the resulting hash
+ (the buffer must be large enough, according to the algorithm, see table in
+ function <<crypto_hash_algorithms,crypto_hash>>)
+* _hash_size_: pointer to a variable used to store the length of the hash computed
+ (in bytes) (can be NULL)
+
+Valore restituito:
+
+* 1 if OK, 0 if error
+
+Esempio in C:
+
+[source,c]
+----
+char hash[256 / 8];
+int rc, hash_size;
+rc = weechat_crypto_hash_file ("/path/to/file", "sha256", hash, &hash_size);
+/* rc == 1, hash_size == 32 and hash is a buffer with:
+ 71 c4 80 df 93 d6 ae 2f 1e fa d1 44 7c 66 c9 52 5e 31 62 18 cf 51 fc 8d 9e d8 32 f2 da f1 8b 73 */
+----
+
+[NOTE]
+Questa funzione non è disponibile nelle API per lo scripting.
+
+// TRANSLATION MISSING
==== crypto_hash_pbkdf2
_WeeChat ≥ 2.8._