Numeric keypad display + password verification
#1
Hello everyone,

I am trying to create an addon that launches a numeric keypad in order to enter a password.
The correct password is contained in the settings.xml file.

I can display the keyboard, but I don't know how to make it check if the password is correct.
I have a few leads but I can't.

I would like that if the password is incorrect, an error message is displayed, if it is correct, the numeric keypad disappears like when locking the Kodi settings. It asks for the password with a maximum of 3 attempts.

Here is my code start:

Code:
import xbmcaddon
import xbmcgui
 
addon       = xbmcaddon.Addon()
addonname   = addon.getAddonInfo('name')
password    = addon.getSettings('password')

xbmcgui.Dialog().input('Enter Password', hashlib.md5(password.encode('utf-8')).hexdigest(), type=xbmcgui.INPUT_PASSWORD, option=xbmcgui.PASSWORD_VERIFY)

I would like the password contained in the settings.xml file to be encoded in MD5.
If you have to make it clear first, no worries.

Thanking you all for your help, I'm getting started in coding ...
Reply
#2
I would just like that if the password contained in settings.xml is correct, the keyboard will close.
If the password is incorrect, an error message is displayed.

Or if it's easier to put the password in the ".py" file for verification, I also take the information :-)
Reply

Logout Mark Read Team Forum Stats Members Help
Numeric keypad display + password verification0