Afaik the encryption is not implemented at all Only obfuscation - I have some examples, but on other machine, will try to get back to you tomorrow. I once tried to use it, so I had in mind there wasn’t encryption.
EDIT: Yes, on Github there is no encryption implemented in defsave.lua
A very simple encryption function could look like this:
function encrypt(input, key)
local result = ""
for i = 1, input:len() do
local char = input:sub(i, i)
local key_char = key:sub(i % key:len() + 1, i % key:len() + 1)
local char_code = char:byte()
local key_code = key_char:byte()
local encrypted_code = char_code + key_code
result = result .. string.char(encrypted_code % 256)
It adds the correspoding character of the key. So to decrypt it back you could simply replace the + with - in line
local encrypted_code = char_code - key_code
This is a very simple approach, but if you don’t want something more finesse, it could be enough
If you want something more secure, we would need to look for some real world encryption methods, I bet there are some written in Lua to easily adapt here.
I think even obfuscation function in defsave looks better than this simple example