Ask coding questions

← Back to all posts
how to load and decrypt the data?
plant3jyyehejy (16)

im creating a login system so i need to encrypt the password/username for saving, however after i load the data in i cannot decrypt is to read the data, how am i able to store the key with the user and still encrypt it to decrypt later

p.s t1 stands for test1
test file name:t1 password:t1

Comments
hotnewtop
ch1ck3n (2315)

why do you need to decrypt

ch1ck3n (2315)

@CodeMaster007
explain to me why you have to decrypt passwords to make a login system.

ch1ck3n (2315)

@CodeMaster007

userpassword == "encryptedpassword" # let's pretend this is an encrypted password

if encrypt(userinput) == userpassword: # userinput is the input of the user
  print("yes the password is correct") # no need to decrypt
CodeMaster007 (109)

I see what your saying. I agree that there really no point but if he really wants to, then why not? @ch1ck3n

ch1ck3n (2315)

@CodeMaster007 also passwords should NEVER NEVER NEVER BE DECRYPTED

CodeMaster007 (109)

Also, how do you make the letters to appear as if it was code? @ch1ck3n

plant3jyyehejy (16)

wait so i was over thinking it? @ch1ck3n

plant3jyyehejy (16)

or just other data in general say, the user wants to see stats? @ch1ck3n

plant3jyyehejy (16)

this doesnt work, i still get the buffer error @ch1ck3n

ch1ck3n (2315)

@CodeMaster007 another ``` after the code

CodeMaster007 (109)

Wow, thank you! its working now! @ch1ck3n

ch1ck3n (2315)

@CodeMaster007 np

you can also use only 1 ` characters

CodeMaster007 (109)

Check this out...

https://www.section.io/engineering-education/user-login-web-system/

There is really a lot to explain and this sums everything up pretty nicely.

CodeMaster007