Encryption and stuff [SOLVED]

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Darlex
Party member
Posts: 128
Joined: Sun Sep 24, 2017 10:02 am
Location: Chile
Contact:

Encryption and stuff [SOLVED]

Post by Darlex »

There is a way of encrypt a string with a password like:

Code: Select all

string = "example"
pass = "example2"
encoded = encode(string,pass) --3DaB75E
decoded = decode(encoded,pass) --example
?
Last edited by Darlex on Mon Mar 25, 2019 12:44 am, edited 1 time in total.
Hi! I wish you have an amazing day!
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: Encryption and stuff

Post by grump »

There is no built-in API for encryption. What do you need it for, how secure does it have to be?
Darlex
Party member
Posts: 128
Joined: Sun Sep 24, 2017 10:02 am
Location: Chile
Contact:

Re: Encryption and stuff

Post by Darlex »

grump wrote: Sun Mar 24, 2019 6:21 pm There is no built-in API for encryption. What do you need it for, how secure does it have to be?
I'm working on a multiproposal multiplatform "easy to use" game engine. I think the best option is something easy to use but enough secure to protect data from dataminers or hackers (and maybe for some multiplayer game)
Hi! I wish you have an amazing day!
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: Encryption and stuff

Post by grump »

Darlex wrote: Sun Mar 24, 2019 8:26 pm something easy to use but enough secure to protect data from dataminers or hackers (and maybe for some multiplayer game)
This looks decent, and is pure Lua code. Pick one of the faster cryptos.

Protection from a dedicated hacker is unattainable. Particularly for a game written in a script language.
I would employ a simple and fast obfuscation scheme instead of using full-blown crypto.
User avatar
zorg
Party member
Posts: 3436
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Encryption and stuff

Post by zorg »

grump wrote: Sun Mar 24, 2019 9:37 pm This looks decent, and is pure Lua code. Pick one of the faster cryptos.
Protection from a dedicated hacker is unattainable. Particularly for a game written in a script language.
I would employ a simple and fast obfuscation scheme instead of using full-blown crypto.
Also, if you do end up using one from there, you'll probably need to rewrite it because they may use features not available with LuaJIT (those | & >> << ops i saw are most definitely ones that i don't recall existing), löve does include the packing utilities, and LuaJIT comes with its own binops lib, but the api is different for the latter, and (at least) the namespace is for the former.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
grump
Party member
Posts: 947
Joined: Sat Jul 22, 2017 7:43 pm

Re: Encryption and stuff

Post by grump »

zorg wrote: Mon Mar 25, 2019 12:37 am Also, if you do end up using one from there, you'll probably need to rewrite it because they may use features not available with LuaJIT/
Ah yes, I did not realize it's for Lua 5.3. Just picked the first decently looking result from Google.
"Rewrite" is a bit of a hyperbole, it looks like it's just a few changes for the fast algos, like NORX.
User avatar
zorg
Party member
Posts: 3436
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: Encryption and stuff [SOLVED]

Post by zorg »

True, it wouldn't be too much work.
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests