コード例 #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);
            }
        }