public void AsymmetricCrypto_IsXmlPrivateKey() { string privateKey = AsymmetricCrypto.CreatePrivateKey(CryptoAlgorithm.RSA, 1024); string publicKey = AsymmetricCrypto.GetPublicKey(CryptoAlgorithm.RSA, privateKey); Assert.IsTrue(AsymmetricCrypto.IsXmlPrivateKey(CryptoAlgorithm.RSA, privateKey)); Assert.IsFalse(AsymmetricCrypto.IsXmlPrivateKey(CryptoAlgorithm.RSA, publicKey)); Assert.IsFalse(AsymmetricCrypto.IsXmlPrivateKey(CryptoAlgorithm.RSA, "hello")); }