def saveKeyToDisk():
	keyring = getKeyring()
	kr = keyring.get_keyring()
	if hasattr(kr,'change_keyring_password'):
		keyring_key = internalGetpass.getRandomKey()
		kr._init_file(keyring_key)
		keyring_key = kr.change_keyring_password(keyring_key)
		
		internalGetpass.saveKeyringPass(keyring_key)
		xbmcutil.ADDON.setSetting('keyring_password',keyring_key)
Exemple #2
0
def saveKeyToDisk():
    keyring = getKeyring()
    kr = keyring.get_keyring()
    if hasattr(kr, 'change_keyring_password'):
        keyring_key = internalGetpass.getRandomKey()
        kr._init_file(keyring_key)
        keyring_key = kr.change_keyring_password(keyring_key)

        internalGetpass.saveKeyringPass(keyring_key)
        xbmcutil.ADDON.setSetting('keyring_password', keyring_key)
def getKeyringName(keyring=None):
	"""
	Returns a somewhat user friendly name of the keyring that is being used
	"""
	keyring = keyring or getKeyring()
	kr = keyring.get_keyring()
	try:
		mod = kr.__module__.rsplit('.',1)[-1]
		cls = kr.__class__.__name__
		return mod + '.' + cls
	except:
		return str(kr).strip('<>').split(' ')[0]
Exemple #4
0
def getKeyringName(keyring=None):
    """
	Returns a somewhat user friendly name of the keyring that is being used
	"""
    keyring = keyring or getKeyring()
    kr = keyring.get_keyring()
    try:
        mod = kr.__module__.rsplit('.', 1)[-1]
        cls = kr.__class__.__name__
        return mod + '.' + cls
    except:
        return str(kr).strip('<>').split(' ')[0]