Ejemplo n.º 1
0
        public PrivateKey(NetworkItem network)
        {
            this.Compressed = true;
            this.Network    = network;

            var rng = new RNGCryptoServiceProvider();

            byte[] data = new byte[32];
            do
            {
                rng.GetBytes(data);
                this.BN = new BigInteger(1, data);
            }while (this.BN.CompareTo(Config.Curve.N) >= 0);
        }
Ejemplo n.º 2
0
 private PublicKey(ECPoint point, bool compressed, NetworkItem network)
 {
     this.Point      = point;
     this.Compressed = compressed;
     this.Network    = network;
 }
Ejemplo n.º 3
0
 private PrivateKey(BigInteger bn, bool compressed, NetworkItem network)
 {
     this.BN         = bn;
     this.Compressed = compressed;
     this.Network    = network;
 }
Ejemplo n.º 4
0
 private Address(byte[] hash, NetworkItem network)
 {
     this._hash    = hash;
     this._network = network;
 }