Example #1
0
        private async Task <string> DecryptContent(String fileName, bool IsIndexFile = false)
        {
            string contentString = string.Empty;
            string fullName      = null;

            if (IsIndexFile)
            {
                fullName = Path.Combine(dlBook.GetDirectory(), "index", fileName.Replace(Constants.XML, Constants.ZIP));
            }
            else
            {
                fullName = Path.Combine(dlBook.GetDirectory(), fileName.Replace(Constants.XML, Constants.ZIP));
            }
            if (await GlobalAccess.DirectoryService.FileExists(fullName))
            {
                contentString += await DecryptManager.DecryptContentFromZipFile(fullName, this.contentKey, dlBook.GetInitVector());
            }
            else
            {
                Logger.Log("Missing file");
            }


            return(contentString);
        }
Example #2
0
        public async Task DecryptDataBase(byte[] contentKey)
        {
            string databasePath        = GetDlBookSqliteFilename(BookId + Constants.SQLITE);
            string decryptDatabasePath = GetDlBookSqliteFilename(Constants.SQLITE_Decrypted);

            if (!await GlobalAccess.DirectoryService.FileExists(decryptDatabasePath))
            {
                await DecryptManager.DecryptDataBase(databasePath, decryptDatabasePath, contentKey, GetInitVector());
            }
        }
Example #3
0
 public Decryptor(DecryptorOptions options)
 {
     this.options = options;
     decryptor    = new DecryptManager(options.OutputPath, options.DatabasePath, options.CoursesPath);
 }
 public BusinessAccessManager()
 {
     queryManager   = new QueryManager();
     loginManager   = new LoginManager(queryManager);
     decryptManager = new DecryptManager();
 }