Beispiel #1
0
        private static GameJoltYaml ParseGJArg(string arg)
        {
            var split = arg.Split('|');
            var key   = new StringEncoding().DecodeRaw(split[0]);
            var data  = new StringEncryption(key).Decrypt(split[1]);

            return(GameJoltYaml.Deserialize(data));
        }
Beispiel #2
0
        private static string GetGJArg(GameJoltYaml gameJoltYaml)
        {
            var key = new byte[16];

            new Random().NextBytes(key);
            var data = GameJoltYaml.Serialize(gameJoltYaml);

            return($"{new StringEncoding().EncodeRaw(key)}|{new StringEncryption(key).Encrypt(data)}");
        }
Beispiel #3
0
 public static string CreateArgs(GameJoltYaml gameJoltYaml, bool forceGraphics) => $"-gj={GetGJArg(gameJoltYaml)} {(forceGraphics ? "-forcegraphics" : "")}";