def decrypt_keychain_item_password(b64_data, decrypted_key, item_type):
    decrypted_json = decrypt_encryption_key(b64_data, decrypted_key)
    decrypted_json = decrypted_json.decode('utf-8') if PY3 else decrypted_json

    try:
        data = json.loads(decrypted_json)
    except __HOLE__:
        data = json.loads(decrypted_json[:-16])

    if item_type == 'webforms.WebForm':
        for field in data['fields']:
            if field.get('designation') == 'password' or \
               field.get('name') == 'Password':
                return field['value']
    elif item_type in ('passwords.Password',
                       'wallet.onlineservices.GenericAccount', ):
        return data['password']
    else:
        return None
dataset/ETHPy150Open Gr1N/1pwd/onepyssword/logic.py/decrypt_keychain_item_password