Esempio n. 1
0
File: cloud.py Progetto: 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)
Esempio n. 2
0
 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 5
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)
Esempio n. 6
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)
Esempio n. 7
0
 def has_signed_up(self):
     return data.file_exists(utils.KEY_MAP_FILE_NAME) and KeyFile.verify_content()
Esempio n. 8
0
File: main.py Progetto: sidd36/ORAM
 def has_signed_up(self):
     return data.file_exists(
         utils.KEY_MAP_FILE_NAME) and KeyFile.verify_content()