Example #1
0
        public void TestKeyPairGeneration()
        {
            byte[] privateKey, publicKey;

            foreach (var compressed in new bool[] { true, false })
            {
                ECDSA.GenerateKeyPair(out privateKey, out publicKey, compressed);
                var publicKeyCheck = ECDSA.GeneratePublicKey(privateKey, compressed);

                CollectionAssert.AreEqual(publicKey, publicKeyCheck);
            }
        }
Example #2
0
        public void TestPublicKeyGeneration()
        {
            var generatedPublicKey = ECDSA.GeneratePublicKey(privateKey, false);

            CollectionAssert.AreEqual(generatedPublicKey, publicKey);
        }