示例#1
0
 public void EncodeSecretKey()
 {
     var keyMaster = new KeyMaster();
     SecretKey sk = keyMaster.GenerateSecretKey();
     string encoded = keyMaster.EncodeSecretKey(sk);
     Assert.IsNotNull(encoded);
     Assert.AreNotSame(string.Empty, encoded);
 }
示例#2
0
        public void EncodeDecodeSecretKey()
        {
            var keyMaster = new KeyMaster();
            SecretKey sk = keyMaster.GenerateSecretKey();
            string encoded = keyMaster.EncodeSecretKey(sk);
            Assert.IsNotNull(encoded);

            SecretKey sk2 = keyMaster.DecodeSecretKey(encoded);
            Assert.IsNotNull(sk2);
            Assert.AreEqual(sk, sk2);
        }