Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

HIDING AND ENCRYPTING PASSWORDS IN PYTHON USING MASKPASS MODULE

import maskpass as mp
# The mask default is "*"
pwd = mp.askpass('Your Nickname:')

if (pwd == 'nick'):
    print('Welcome')
else:
    print("Incorrect password")

# SETTING A VALUE FOR MASK=
import maskpass as mp

pwd = mp.askpass('Your Nickname:', mask="#")

if (pwd == 'nick'):
    print('Welcome')
else:
    print("Incorrect password")
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #HIDING #AND #ENCRYPTING #PASSWORDS #IN #PYTHON #USING #MASKPASS #MODULE
ADD COMMENT
Topic
Name
5+2 =