Ejemplo n.º 1
0
        public void DSAEncryptionTestInitialize()
        {
            var keys = DSAEncryption.GenerateKeys();

            publicKey  = keys[0];
            privateKey = keys[1];
        }
Ejemplo n.º 2
0
        public void TestMethod1()
        {
            const string str       = "123456789";
            var          dsa       = new DSAEncryption();
            var          targetStr = dsa.EncryptWithPriKey(str, privateKey);

            Assert.IsTrue(dsa.VerifyWithPubKey(str, targetStr, publicKey));
        }