bool ValidateCryptArgs(Security.Cryptography.CryptographyTransformType transformType) { if (string.IsNullOrWhiteSpace(mPath) || string.IsNullOrWhiteSpace(mName)) { Console.WriteLine("Error: Invalid path or name"); return(false); } string input_file = Path.Combine(mPath, mName) + KSoft.Phoenix.Resource.EraFileUtil.kExtensionEncrypted; if (transformType == Security.Cryptography.CryptographyTransformType.Encrypt) { input_file += KSoft.Phoenix.Resource.EraFileUtil.kExtensionDecrypted; } if (!File.Exists(input_file)) { Console.WriteLine("Error: Input PKG does not exist"); return(false); } return(true); }
static void Crypt(string path, string eraName, string outputPath, string switches, Security.Cryptography.CryptographyTransformType transformType) { KSoft.Phoenix.Resource.EraFileUtil.Crypt(path, eraName, outputPath, transformType, Console.Out); }