Ejemplo n.º 1
0
        public void StoreKeys(AZKeys secrets, string filePath)
        {
            XmlSerializer ser    = new XmlSerializer(typeof(AZKeys));
            TextWriter    writer = new StreamWriter(filePath);

            ser.Serialize(writer, secrets);
            writer.Close();
        }
Ejemplo n.º 2
0
        public AZKeys GetSecrets(string filePath)
        {
            XmlSerializer ser    = new XmlSerializer(typeof(AZKeys));
            FileStream    stream = new FileStream(filePath, FileMode.Open);
            AZKeys        keys   = (AZKeys)ser.Deserialize(stream);

            return(keys);
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            string storePath = @"C:\tools\keys.xml";

            AZKeys.AZKeys keys = new AZKeys.AZKeys()
            {
                azStorageAccountName = "unityscores", azStoragePrimaryKey = "qevOBB7bEvX69HG18vROe1rQLjZM7ZfLXuW9aOpmAgHnq/XMyuBx/fdagQ4ytWISaksMVKphMlICfPho8/CUIg=="
            };

            AZKeysClass az = new AZKeysClass();

            az.StoreKeys(keys, storePath);

            AZKeys.AZKeys key2 = az.GetSecrets(storePath);
        }