Exemple #1
0
        public UpdateInfo ReadUpdateInfo()
        {
            if (!File.Exists(BootstrapPath))
            {
                return(null);
            }

            try
            {
                using (IVCryptoStream crypto = IVCryptoStream.Load(BootstrapPath, BootstrapKey))
                {
                    PacketStream stream = new PacketStream(crypto, new G2Protocol(), FileAccess.Read);

                    G2Header root = null;

                    while (stream.ReadPacket(ref root))
                    {
                        if (root.Name == IdentityPacket.Update)
                        {
                            return(UpdateInfo.Decode(root));
                        }
                    }
                }
            }
            catch { }

            return(null);
        }