示例#1
0
        public void GenerateBase64Key()
        {
            string key = KeyGenUtility.GenerateBase64Key();

            System.Diagnostics.Debug.WriteLine("THe KEY IS: " + key);

            Assert.IsFalse(string.IsNullOrWhiteSpace(key));
        }
示例#2
0
        /// <summary>
        /// Generates the IoT Hub key which is assigned to this instance.
        /// </summary>
        /// <returns>The generated key.</returns>
        public string GenerateHubKey()
        {
            if (string.IsNullOrWhiteSpace(this.HubID))
            {
                this.HubID = KeyGenUtility.GenerateBase64Key();
            }

            return(this.HubID);
        }