Beispiel #1
0
        public void CheckPasswordTest()
        {
            var     password = "******";
            Keypair kp       = _rsa.GetPrivateKey(password);

            Assert.IsTrue(kp.CheckPassword(password));
        }
Beispiel #2
0
        public void GetPrivateKeyTest()
        {
            Assert.Throws <InvalidOperationException>(() => _rsaPublic.GetPrivateKey("password"));
            Keypair key = _rsa.GetPrivateKey("password");

            Assert.IsNotNull(key.PrivateExponent);
        }