Exemple #1
0
        public void FromRandom()
        {
            var key1    = PrivateKey.FromRandom();
            var pubkey1 = key1.CreatePublicKey();

            Assert.True(key1.VerifyPubKey(pubkey1));
        }
Exemple #2
0
        public void ShouldBeAbleToSerializeAndRecoverIdentities()
        {
            PrivateKey id   = PrivateKey.FromRandom();
            string     str  = id.ToString();
            PrivateKey back = PrivateKey.FromString(str);

            Assert.Equal(id.GetHashCode(), back.GetHashCode());
        }