From ab835fed13e300b3a49131296917f5038eb6c06c Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 4 Mar 2022 15:22:45 +0000 Subject: util.hex: Deprecate to/from in favour of encode/decode, for consistency! --- plugins/mod_auth_internal_hashed.lua | 2 +- plugins/mod_storage_xep0227.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_auth_internal_hashed.lua b/plugins/mod_auth_internal_hashed.lua index 1b0e76ed..cf851eef 100644 --- a/plugins/mod_auth_internal_hashed.lua +++ b/plugins/mod_auth_internal_hashed.lua @@ -14,7 +14,7 @@ local usermanager = require "core.usermanager"; local generate_uuid = require "util.uuid".generate; local new_sasl = require "util.sasl".new; local hex = require"util.hex"; -local to_hex, from_hex = hex.to, hex.from; +local to_hex, from_hex = hex.encode, hex.decode; local saslprep = require "util.encodings".stringprep.saslprep; local secure_equals = require "util.hashes".equals; diff --git a/plugins/mod_storage_xep0227.lua b/plugins/mod_storage_xep0227.lua index 1a7baaeb..9a3ca002 100644 --- a/plugins/mod_storage_xep0227.lua +++ b/plugins/mod_storage_xep0227.lua @@ -68,11 +68,11 @@ local function createOuterXml(user, host) end local function hex_to_base64(s) - return base64.encode(hex.from(s)); + return base64.encode(hex.decode(s)); end local function base64_to_hex(s) - return base64.encode(hex.from(s)); + return base64.encode(hex.decode(s)); end local handlers = {}; -- cgit v1.2.3