public static bool AddFile(string password, string filePath, string fileKey) { var file = new ApprovedFile { FileName = Path.GetFileName(filePath), DestinationPath = filePath, Password = password }; return(Whitelist.TryAdd(fileKey, file)); }
//Add a file to the white list public static bool AddFile(SecureString password, string filePath, string fileKey) { //Create a new approved file var file = new ApprovedFile { FileName = Path.GetFileName(filePath), DestinationPath = filePath, Password = password }; return Whitelist.TryAdd(fileKey, file); }