remotelogin/devices/utils.py
def transform_password(values, crypto_engine_function):
    """ transform a structure by encrypting/decrypting any value in a dictionary for any key that contains the word
        'password'
    """
    for _k, _v in values.items():
        if isinstance(_v, collections.MutableMapping):
            transform_password(_v, crypto_engine_function)
        elif utils.lists.is_list_or_tuple(_v):
            for _vv in (_vv for _vv in _v if isinstance(_vv, collections.MutableMapping)):
                transform_password(_vv, crypto_engine_function)
        elif 'password' in _k and _v:
            values[_k] = crypto_engine_function(_v)
 transform a structure by encrypting/decrypting any value in a dictionary for any key that contains the word
        'password'
    
transform a structure by encrypting/decrypting any value in a dictionary for any key that contains the word
'password'
transform a structure by encrypting / decrypting any value in a dictionary for any key that contains the word ' password '
def transform_password(values, crypto_engine_function):
    for _k, _v in values.items():
        if isinstance(_v, collections.MutableMapping):
            transform_password(_v, crypto_engine_function)
        elif utils.lists.is_list_or_tuple(_v):
            for _vv in (_vv for _vv in _v if isinstance(_vv, collections.MutableMapping)):
                transform_password(_vv, crypto_engine_function)
        elif 'password' in _k and _v:
            values[_k] = crypto_engine_function(_v)
def transform_password ( values , crypto_engine_function ) : for _k , _v in values . items ( ) : if isinstance ( _v , collections . MutableMapping ) : transform_password ( _v , crypto_engine_function ) elif utils . lists . is_list_or_tuple ( _v ) : for _vv in ( _vv for _vv in _v if isinstance ( _vv , collections . MutableMapping ) ) : transform_password ( _vv , crypto_engine_function ) elif 'password' in _k and _v : values [ _k ] = crypto_engine_function ( _v )
transform a structure by encrypting/decrypting any value in a dictionary for any key that contains the word
'password'
transform a structure by encrypting / decrypting any value in a dictionary for any key that contains the word ' password '
""" transform a structure by encrypting/decrypting any value in a dictionary for any key that contains the word
        'password'
    """
values
crypto_engine_function