Software / code / prosody-modules
Comparison
mod_cloud_notify_encrypted/mod_cloud_notify_encrypted.lua @ 6344:eb834f754f57 draft default tip
Merge update
| author | Trần H. Trung <xmpp:trần.h.trung@trung.fun> |
|---|---|
| date | Fri, 18 Jul 2025 20:45:38 +0700 |
| parent | 6333:dbbbd5caf292 |
comparison
equal
deleted
inserted
replaced
| 6309:342f88e8d522 | 6344:eb834f754f57 |
|---|---|
| 12 local ossl_ciphers = require "openssl.cipher"; | 12 local ossl_ciphers = require "openssl.cipher"; |
| 13 crypto = {}; | 13 crypto = {}; |
| 14 -- FIXME: luaossl does not expose the EVP_CTRL_GCM_GET_TAG API, so we append 16 NUL bytes | 14 -- FIXME: luaossl does not expose the EVP_CTRL_GCM_GET_TAG API, so we append 16 NUL bytes |
| 15 -- Siskin does not validate the tag anyway. | 15 -- Siskin does not validate the tag anyway. |
| 16 function crypto.aes_128_gcm_encrypt(key, iv, message) | 16 function crypto.aes_128_gcm_encrypt(key, iv, message) |
| 17 return ciphers.new("AES-128-GCM"):encrypt(key, iv):final(message)..string.rep("\0", 16); | 17 return ossl_ciphers.new("AES-128-GCM"):encrypt(key, iv):final(message)..string.rep("\0", 16); |
| 18 end | 18 end |
| 19 end | 19 end |
| 20 | 20 |
| 21 local xmlns_jmi = "urn:xmpp:jingle-message:0"; | 21 local xmlns_jmi = "urn:xmpp:jingle-message:0"; |
| 22 local xmlns_jingle_apps_rtp = "urn:xmpp:jingle:apps:rtp:1"; | 22 local xmlns_jingle_apps_rtp = "urn:xmpp:jingle:apps:rtp:1"; |