private Pack1Unarchiver(string packagePath, Pack1Meta metaData, string destinationDirPath, byte[] key, string suffix, BytesRange range) { Checks.ArgumentFileExists(packagePath, "packagePath"); Checks.ArgumentDirectoryExists(destinationDirPath, "destinationDirPath"); Checks.ArgumentNotNull(suffix, "suffix"); if (range.Start == 0) { Assert.AreEqual(MagicBytes.Pack1, MagicBytes.ReadFileType(packagePath), "Is not Pack1 format"); } DebugLogger.LogConstructor(); DebugLogger.LogVariable(packagePath, "packagePath"); DebugLogger.LogVariable(destinationDirPath, "destinationDirPath"); DebugLogger.LogVariable(suffix, "suffix"); _packagePath = packagePath; _metaData = metaData; _destinationDirPath = destinationDirPath; _suffix = suffix; _range = range; using (var sha256 = SHA256.Create()) { _key = sha256.ComputeHash(key); } _iv = Convert.FromBase64String(_metaData.Iv); }
public ZipUnarchiver(string packagePath, string destinationDirPath, string password = null) { Checks.ArgumentFileExists(packagePath, "packagePath"); Checks.ArgumentDirectoryExists(destinationDirPath, "destinationDirPath"); DebugLogger.LogConstructor(); DebugLogger.LogVariable(packagePath, "packagePath"); DebugLogger.LogVariable(destinationDirPath, "destinationDirPath"); _packagePath = packagePath; _destinationDirPath = destinationDirPath; _password = password; }
public FilePatcher(string filePath, string diffPath, string outputFilePath) { Checks.ArgumentFileExists(filePath, "filePath"); Checks.ArgumentFileExists(diffPath, "diffPath"); Checks.ArgumentParentDirectoryExists(outputFilePath, "outputFilePath"); DebugLogger.LogConstructor(); DebugLogger.LogVariable(filePath, "filePath"); DebugLogger.LogVariable(diffPath, "diffPath"); DebugLogger.LogVariable(outputFilePath, "outputFilePath"); _filePath = filePath; _diffPath = diffPath; _outputFilePath = outputFilePath; }
public Pack1Unarchiver(string packagePath, Pack1Meta metaData, string destinationDirPath, byte[] key) { Checks.ArgumentFileExists(packagePath, "packagePath"); Checks.ArgumentDirectoryExists(destinationDirPath, "destinationDirPath"); Assert.AreEqual(MagicBytes.Pack1, MagicBytes.ReadFileType(packagePath), "Is not Pack1 format"); DebugLogger.LogConstructor(); DebugLogger.LogVariable(packagePath, "packagePath"); DebugLogger.LogVariable(destinationDirPath, "destinationDirPath"); _packagePath = packagePath; _metaData = metaData; _destinationDirPath = destinationDirPath; using (var sha256 = SHA256.Create()) { _key = sha256.ComputeHash(key); } _iv = Convert.FromBase64String(_metaData.Iv); }