Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Pasword Encryption
- cateatingcheese-
-
4 posts
Pasword Encryption
hi, im currently making a project that requires you to make an account to use, and i have already put a login system and a sign up system
what i need is a password encryption system so that if someone look throught the code and trys to look at the password, they wouldnt be able to look at it.
im not sure if it is possible, and dont think itll be completely foolproof, but id appreciate the help anyways
what i need is a password encryption system so that if someone look throught the code and trys to look at the password, they wouldnt be able to look at it.
im not sure if it is possible, and dont think itll be completely foolproof, but id appreciate the help anyways

- HundenBasse
-
100+ posts
Pasword Encryption
There is of course never a 100% foolproof password system (Just look at any modern password system) But you can do something that will make it almost 100% foolproof.
This works by subjecting the password the user inputted to 2 small tricks before saving it. The first trick is to encode the password into numbers using the list method and the second trick is to take that number you receive from the list method and times it by a random 4 digit number that you also give the user and then you save that result. Then you tell the user to save that 4 digit number and when the user wants to login to his created account he inputs his username, password and that number and with that you can encrypt the inputted password times it by the inputted number and see if your password list contains that number if it does the user logged in correctly if it doesnt the user did not.
I can provide an example if needed
This works by subjecting the password the user inputted to 2 small tricks before saving it. The first trick is to encode the password into numbers using the list method and the second trick is to take that number you receive from the list method and times it by a random 4 digit number that you also give the user and then you save that result. Then you tell the user to save that 4 digit number and when the user wants to login to his created account he inputs his username, password and that number and with that you can encrypt the inputted password times it by the inputted number and see if your password list contains that number if it does the user logged in correctly if it doesnt the user did not.
I can provide an example if needed
Last edited by HundenBasse (July 2, 2023 17:50:18)
- HundenBasse
-
100+ posts
Pasword Encryption
So I've encountered the first theoretical problem. When assigning a value to a list that value is not saved anywhere and in my original thought i suspected it was saved somewhere on your account but of course it isn't and therefore when you add your username and password to the list it isn't saved and disappears when you reload. The only way to fix this is using cloud variables but that isn't a very good fix since cloud variables don't save more than 256 digits.
So sadly I don't think it is even possible to make any form of username password system in scratch. Not even an unsecure one.
So sadly I don't think it is even possible to make any form of username password system in scratch. Not even an unsecure one.
- Discussion Forums
- » Help with Scripts
-
» Pasword Encryption