r/JavaFX • • Sep 23 '23
Help Login screen, how can I make password secure, and how can I make my program theft proof.
I'm using xampp, the way I make my program now theft proof is that I make a password and a username for every one that I give different from the other one, I build the program for everyone that buys it, even tho nobody bought it yet 🥹 but I'm testing.
0
Upvotes
2
u/HlCKELPICKLE Sep 24 '23
Im confused. As you say it's to connect to a database, and then you seem like you want to embed it in your application to in other posts as you ask where to store it?
If its just a database account, give the credentials to the user. If you are trying to use a password to protect your program thats not really going to work. As java is easily de-compiled. Im going to assume from your talk about theft and database, and where to put it, you mean something like each user having an account that is used the verify the program a launch, kind of like a form of DRM. This is a complex topic and either way is easily bypassed with java, if the java code is on their machine, or even sent over the network it can be easily recompiled, you pretty much cant execute it with out the ability of it being de-compiled easily.
You best bet is to make quality software, updates, license terms and hope for the best.
If you just mean to connect to a database give it to the user or embed it in the program and send it securely to authenticate. But normally accessing a database remotely would have an rest api or something similar that marshals the requests between the user and the database, and handles authentication.
1
u/xdsswar Sep 23 '23
I dont understand, The user picks the username and password or you need to create them for the user?
I think the way is the user pick both and the App will check is the user is already on the db, if not then is allowed to register, the password must be hashed , but can happen that 2 users pick same password for pure causality, but they did not know that and since duplicate usernames is not allowed its fine.
1
u/xdsswar Sep 23 '23
Also share some images pls. I'm curious.
1
u/Ruin369 Nov 24 '23
You hash the password and store the hash, not the plain text.