Example #1
0
 public I2PLeaseInfo(I2PDestinationInfo di)
 {
     PublicKey         = di.Destination.PublicKey;
     PrivateKey        = di.PrivateKey;
     PrivateSigningKey = di.PrivateSigningKey;
     PublicSigningKey  = di.Destination.SigningPublicKey;
 }
Example #2
0
 public I2PPublicKey(I2PPrivateKey priv) : base(priv.Certificate)
 {
     Key = new BufLen(I2PConstants
                      .ElGamalG.ModPow(
                          priv.ToBigInteger(),
                          I2PConstants.ElGamalP)
                      .ToByteArrayUnsigned());
 }
Example #3
0
 public I2PDestinationInfo(BufRef reader)
 {
     Certificate       = new I2PCertificate(reader);
     PrivateKey        = new I2PPrivateKey(reader, Certificate);
     PublicKey         = new I2PPublicKey(reader, Certificate);
     PrivateSigningKey = new I2PSigningPrivateKey(reader, Certificate);
     PublicSigningKey  = new I2PSigningPublicKey(reader, Certificate);
 }
Example #4
0
        public I2PDestinationInfo(string base64)
        {
            var reader = new BufRefLen(FreenetBase64.Decode(base64));

            Certificate       = new I2PCertificate(reader);
            PrivateKey        = new I2PPrivateKey(reader, Certificate);
            PublicKey         = new I2PPublicKey(reader, Certificate);
            PrivateSigningKey = new I2PSigningPrivateKey(reader, Certificate);
            PublicSigningKey  = new I2PSigningPublicKey(reader, Certificate);
        }
Example #5
0
 public I2PLeaseInfo(
     I2PPublicKey pubkey,
     I2PSigningPublicKey spubkey,
     I2PPrivateKey privkey,
     I2PSigningPrivateKey sprivkey)
 {
     PublicKey         = pubkey;
     PrivateKey        = privkey;
     PrivateSigningKey = sprivkey;
     PublicSigningKey  = spubkey;
 }
Example #6
0
        public I2PDestinationInfo(I2PSigningKey.SigningKeyTypes signkeytype)
        {
            Certificate = new I2PCertificate(signkeytype);
            var keys = I2PPrivateKey.GetNewKeyPair();

            PublicKey  = keys.PublicKey;
            PrivateKey = keys.PrivateKey;

            PrivateSigningKey = new I2PSigningPrivateKey(Certificate);
            PublicSigningKey  = new I2PSigningPublicKey(PrivateSigningKey);
        }
Example #7
0
 public I2PDestinationInfo(
     I2PCertificate cert,
     I2PPublicKey pubkey,
     I2PSigningPublicKey spubkey,
     I2PPrivateKey privkey,
     I2PSigningPrivateKey sprivkey)
 {
     Certificate       = cert;
     PublicKey         = pubkey;
     PrivateKey        = privkey;
     PrivateSigningKey = sprivkey;
     PublicSigningKey  = spubkey;
 }
Example #8
0
 public I2PDestinationInfo(BufRef reader)
 {
     Destination       = new I2PDestination(reader);
     PrivateKey        = new I2PPrivateKey(reader, Destination.Certificate);
     PrivateSigningKey = new I2PSigningPrivateKey(reader, Destination.Certificate);
 }