Username and Password
chiliconco (16)

I am new to python and i programmed this. It took me quite a while. It may not be much but I am proud of it! Do you have any ideas on what I could implement this into in the future?

Thanks for taking the time to check this out :)

Chiliconco

P.S If there are any errors PLEASE let me know!!


CHANGELOG:

1.1 - Fixed capital letter error upon signing up/logging in.
1.2 - Fixed whitespace error upon signing up.
1.3 - If login/sign up is mistyped, the script now re-asks the question.
1.4 - Improved naviagtion
1.5 - PASSWORDS NOW HASHED! All credit goes to @Coder100 for helping me out
immensely with this! :)

You are viewing a single comment. View All
Coder100 (293)

This is a great program!
You probably want to encrypt the passwords though...

chiliconco (16)

@Coder100 Thank you! Encrytion is the next step after I fix some other problems with signing up. :)

Coder100 (293)

Good luck!
Do you want any help with encryption? @chiliconco

chiliconco (16)

@Coder100 Yes please, that would be great! I have been trying to wrap my head around it for a while but it didn't make much sense to me. Some help would be greatly appreciated, thank you :))

Coder100 (293)

Until I go onto computer, try converting the hash function in this project: https://glitch.com/~fearless-nova on line 376. (It’s on the client.js file in the public folder) @chiliconco

Coder100 (293)

I will convert it for you as soon as I can. Good luck! @chiliconco

chiliconco (16)

@Coder100 Thank you so much! I will try and convert the hash as soon as I can. But I do not have access to a computer at the moment so I will get back to you tomorrow. Thanks! :)

Coder100 (293)

Ok I did it! View the code and proofs involving the code here: https://repl.it/@Coder100/easy-python-hash-encode
EDIT: This works for everything except for special characters, like 我会说中文
Feel free to make it better!
@chiliconco

chiliconco (16)

@Coder100 wow! Nice work, thank you very much :)

chiliconco (16)

@Coder100 Hi there your hashing tool is very helpful but I seem to have ran into an error, whenever I try and change the text that is going to get hashed I get this error:

Traceback (most recent call last):
File "main.py", line 41, in <module>
print(hash("Hello World!")) File "main.py", line 22, in hash indx += ord(str(i))TypeError: ord() expected a character, but string of length 2 found

Thanks!

Coder100 (293)

Yes, i see this problem, and I think maybe this might work: line 22: indx += ord(str(i[0])) maybe....? Try it out!

Also, are you doing the hackathon? @chiliconco

chiliconco (16)

@Coder100 Thank you, and no I am not doing the hackathon but there is still an error with the code :(

Traceback (most recent call last):
File "main.py", line 41, in <module>
print(hash("hello world"))
File "main.py", line 22, in hash
indx += ord(str(i[0]))
TypeError: 'int' object is not subscriptable

Thanks so much for your help! :))

Coder100 (293)

Ok, make a loop that goes through ‘i’ then split it up into an array, then do what I did. Good luck! @chiliconco

Coder100 (293)

You’re welcome! Does it work now? I didn’t test it @chiliconco

chiliconco (16)

@Coder100 Sorry I couldnt get back to you earlier, I was in class, thanks!!! :)

chiliconco (16)

@Coder100 Just tested it, it works PERFECTLY! Do you know of any tutorials that could help me dehash the password for when the user logs in? Thank you!! :))

Coder100 (293)

No, you don't really dehash, but instead, you encrypt what the user typed in and then see if it matches the password that was saved, because the encryption method, however complicated it is, is always constant. @chiliconco

chiliconco (16)

@Coder100 Yes, your right I didn't think of that, fixing it now :)

Coder100 (293)

Ok, good luck! If you have any more errors, contact me and I'll get to work! @chiliconco

chiliconco (16)

@Coder100 It works completely now :) Thanks!!