Software /
code /
prosody
Comparison
plugins/mod_storage_xep0227.lua @ 12355:a0ff5c438e9d
util.hex: Deprecate to/from in favour of encode/decode, for consistency!
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 04 Mar 2022 15:22:45 +0000 |
parent | 12195:c5788969b812 |
child | 12454:b2438f374b3e |
comparison
equal
deleted
inserted
replaced
12354:3ce3633527af | 12355:a0ff5c438e9d |
---|---|
66 :tag("host", {jid=host}) | 66 :tag("host", {jid=host}) |
67 :tag("user", {name = user}); | 67 :tag("user", {name = user}); |
68 end | 68 end |
69 | 69 |
70 local function hex_to_base64(s) | 70 local function hex_to_base64(s) |
71 return base64.encode(hex.from(s)); | 71 return base64.encode(hex.decode(s)); |
72 end | 72 end |
73 | 73 |
74 local function base64_to_hex(s) | 74 local function base64_to_hex(s) |
75 return base64.encode(hex.from(s)); | 75 return base64.encode(hex.decode(s)); |
76 end | 76 end |
77 | 77 |
78 local handlers = {}; | 78 local handlers = {}; |
79 | 79 |
80 -- In order to support custom account properties | 80 -- In order to support custom account properties |