コード例 #1
0
ファイル: cloud.py プロジェクト: sidd36/ORAM
 def __init__(self, aes_crypto):
     if not data.file_exists(utils.CLOUD_MAP_FILE_NAME):
         logger.info('Create cloud map')
         self.create_cloud_map()
     cloud_map = self.load_cloud_map()
     self.aes_crypto = aes_crypto
     self.token = cloud_map[0]
     self.cloud_init = cloud_map[1]
     self.dbx = self.get_dropbox_access(self.token)
コード例 #2
0
ファイル: cloud.py プロジェクト: marcjulian/pyoram
 def __init__(self, aes_crypto):
     if not data.file_exists(utils.CLOUD_MAP_FILE_NAME):
         logger.info('Create cloud map')
         self.create_cloud_map()
     cloud_map = self.load_cloud_map()
     self.aes_crypto = aes_crypto
     self.token = cloud_map[0]
     self.cloud_init = cloud_map[1]
     self.dbx = self.get_dropbox_access(self.token)
コード例 #3
0
 def __init__(self):
     if not data.file_exists(utils.FILE_MAP_FILE_NAME):
         with data.open_data_file(utils.FILE_MAP_FILE_NAME,
                                  utils.WRITE_MODE) as file_map:
             json.dump({
                 JSON_FILES: (),
                 JSON_ID_COUNTER: 0
             },
                       file_map,
                       indent=2)
コード例 #4
0
 def __init__(self):
     if not data.file_exists(utils.POSITION_MAP_FILE_NAME):
         with data.open_data_file(utils.POSITION_MAP_FILE_NAME,
                                  utils.WRITE_MODE) as position_map:
             json.dump((), position_map, indent=2)
コード例 #5
0
ファイル: map.py プロジェクト: marcjulian/pyoram
 def __init__(self):
     if not data.file_exists(utils.POSITION_MAP_FILE_NAME):
         with data.open_data_file(utils.POSITION_MAP_FILE_NAME, utils.WRITE_MODE) as position_map:
             json.dump((), position_map, indent=2)
コード例 #6
0
ファイル: map.py プロジェクト: marcjulian/pyoram
 def __init__(self):
     if not data.file_exists(utils.FILE_MAP_FILE_NAME):
         with data.open_data_file(utils.FILE_MAP_FILE_NAME, utils.WRITE_MODE) as file_map:
             json.dump({JSON_FILES: (), JSON_ID_COUNTER: 0}, file_map, indent=2)
コード例 #7
0
ファイル: main.py プロジェクト: marcjulian/pyoram
 def has_signed_up(self):
     return data.file_exists(utils.KEY_MAP_FILE_NAME) and KeyFile.verify_content()
コード例 #8
0
ファイル: main.py プロジェクト: sidd36/ORAM
 def has_signed_up(self):
     return data.file_exists(
         utils.KEY_MAP_FILE_NAME) and KeyFile.verify_content()