1

I want to encrypt a piece of text, like if someone where to type in their password it would come up with stars or the dots I'm using tkinter if that matters. in the entry part can the users password be encrypted?

w2 = Label(root, text="Password")
w2.pack()

e1 = Entry(root)
e1.pack()
0

2 Answers 2

2
e1 = Entry( root, show= '*', textvariable = passport )
Sign up to request clarification or add additional context in comments.

Comments

0

What you need is:

w2 = Label(root, text="Password")
w2.pack()

e1 = Entry(root,show="*")
e1.pack()

This will show a * instead of other characters. Then maybe add:

if e1 == "PASSWORD HERE" :
    #What happens if the password is correct
else:
    #What happens if the password is incorrect

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.