public void EncodeSecretKey() { var keyMaster = new KeyMaster(); SecretKey sk = keyMaster.GenerateSecretKey(); string encoded = keyMaster.EncodeSecretKey(sk); Assert.IsNotNull(encoded); Assert.AreNotSame(string.Empty, encoded); }
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); }