Ejemplo n.º 1
0
        public void OnGet()
        {
            // load the balance from the neo council wallet using their public address
            Existing = _neo.GetBalance("AQVh2pG732YvtNaxEGkQUei3YA4cvo7d2i");

            // generate a new random private key, and then get the balance from that
            GeneratedKey = _neo.GeneratePrivateKey();
            Generated    = _neo.GetBalance(GeneratedKey.ToAddress());
        }
        public byte[] ProduceContextualKey(IDictionary <string, string> context)
        {
            if (context == null)
            {
                return(GeneratedKey);
            }
            // Use the context's "id" key to jank up the key
            var specialSauce = (byte)(context["id"].GetHashCode());

            return(GeneratedKey.Select(x => (byte)(x ^ specialSauce)).ToArray());
        }