How would I take a string and encrypt it with a key into something unreadable? Also, how would I decrypt this string using the key?
For example,
I have this string: "hi gamers!"
and I want to use this as my key: "$nLliCMdi7gcynsFCK9u0aVNdtkNIiZG"
and create a module or function that would do something like this:
local enc = module:encrypt(
"hi gamers!", -- string
"nLliCMdi7gcynsFCK9u0aVNdtkNIiZG" -- key
)
print(enc)
would return something similar to this: 92nyAco2wm0YwFZAw2+8Qj7zYnNmbbcLdkk=
and be able to decrypt it like this:
local dec = module:decrypt(
enc, -- encrypted string
"nLliCMdi7gcynsFCK9u0aVNdtkNIiZG" -- key
)
print(dec) -- returns "hi gamers!"

1 comment
Unfortunately, I am not aware of any existing modules that provide such functionality. You'll have to do some research of your own to construct your own encryption module.