Encrypted text files
Tom Glod
tom at makeshyft.com
Fri Jul 19 10:38:15 EDT 2024
function Encrypt_This pEncryptWhat,pKey,pSalt,pCipher
local tEncryptedResult
if pCipher = "" then
encrypt pEncryptWhat using "aes256" with password pKey and salt pSalt
else
encrypt pEncryptWhat using pCipher with password pKey and salt pSalt
end if
return it
end Encrypt_This
function Decrypt_This pDecryptWhat,pKey,pSalt,pCipher
local tDecryptResult
put it
try
if pCipher = "" then
decrypt pDecryptWhat using "aes256" with password pKey and salt
pSalt
else
decrypt pDecryptWhat using pCipher with password pKey and salt
pSalt
end if
catch tError
put tError
end try
put the result into tDecryptResult
if the result contains "Error" then
put the result into tDecryptResult["error"]
else
put "ok" into tDecryptResult["result"]
put it into tDecryptResult["data"]
end if
return tDecryptResult
end Decrypt_This
On Thu, Jul 18, 2024 at 11:11 AM Bob Sneidar via use-livecode <
use-livecode at lists.runrev.com> wrote:
> Also be sure to write and read binary.
>
> Bob S
>
>
> > On Jul 18, 2024, at 8:08 AM, Bob Sneidar <bobsneidar at iotecdigital.com>
> wrote:
> >
> > I use the built-in encryption library. See encrypt and decrypt in the
> dictionary. Not sure if there are size limits though. How big might your
> biggest text files be?
> >
> > Bob S
> >
> >
> >> On Jul 18, 2024, at 6:53 AM, Charles Szasz via use-livecode <
> use-livecode at lists.runrev.com> wrote:
> >>
> >> Is there a reliable method to encrypt a text file using LC? I have an
> app that generates text files and wanted encryption to my app.
> >>
> >>
> >> Sent from my iPad
> >> _______________________________________________
> >> use-livecode mailing list
> >> use-livecode at lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list