public void DSAEncryptionTestInitialize() { var keys = DSAEncryption.GenerateKeys(); publicKey = keys[0]; privateKey = keys[1]; }
public void TestMethod1() { const string str = "123456789"; var dsa = new DSAEncryption(); var targetStr = dsa.EncryptWithPriKey(str, privateKey); Assert.IsTrue(dsa.VerifyWithPubKey(str, targetStr, publicKey)); }