Пример #1
0
 public PrivateKey(ECKeyPair ecKeyPair)
 {
     if (ecKeyPair.privKey == null)
         throw new ArgumentException("ECKeyPair does not contain private key.");
     this.ecKeyPair = ecKeyPair;
     this.pubKey = new PublicKey(ecKeyPair);
 }
Пример #2
0
 public PrivateKey()
 {
     Byte[] pk = new Byte[32];
     RandomNumberGenerator rng = new RNGCryptoServiceProvider();
     rng.GetBytes(pk);
     this.ecKeyPair = new ECKeyPair(pk, null, false);
     this.pubKey = new PublicKey(ecKeyPair);
 }
Пример #3
0
 public PrivateKey(Byte[] privKey, Boolean compress)
 {
     this.ecKeyPair = new ECKeyPair(privKey, null, compress);
     this.pubKey = new PublicKey(ecKeyPair);
 }
Пример #4
0
 public PublicKey(ECKeyPair ecKeyPair)
 {
     this.ecKeyPair = ecKeyPair;
     this.address = new Address(ecKeyPair.pubKey);
 }
Пример #5
0
 public PublicKey(Byte[] pubKey)
 {
     this.ecKeyPair = new ECKeyPair(null, pubKey);
     this.address = new Address(ecKeyPair.pubKey);
 }
Пример #6
0
 public PrivateKey(Byte[] privKey, Boolean compress)
 {
     this.ecKeyPair = new ECKeyPair(privKey, null, compress);
     this.pubKey    = new PublicKey(ecKeyPair);
 }
Пример #7
0
 public PublicKey(ECKeyPair ecKeyPair)
 {
     this.ecKeyPair = ecKeyPair;
     this.address   = new Address(ecKeyPair.pubKey);
 }
Пример #8
0
 public PublicKey(Byte[] pubKey)
 {
     this.ecKeyPair = new ECKeyPair(null, pubKey);
     this.address   = new Address(ecKeyPair.pubKey);
 }