public override void Write(BufRefStream dest) { dest.Write((BufRefLen)BufUtils.Flip16BL(SessionId)); dest.Write(TwentyBytes); PrivateKey.Write(dest); Leases.Write(dest); }
public override void Write(List <byte> dest) { dest.AddRange(BitConverter.GetBytes(SessionId)); var dummy = new I2PSigningPrivateKey(new I2PCertificate()); dummy.Write(dest); //Info.PrivateSigningKey.Write( dest ); Info.PrivateKey.Write(dest); Leases.Write(dest); /* * var ar = dest.ToArray(); * int ix = 22; * var pivk = new I2PPrivateKey( ar, ref ix ); * ix = 665; * var refpubk = new I2PPublicKey( ar, ref ix ); * var diff = ( new I2PPublicKey( pivk ) ).Key.Subtract( refpubk.Key ); * var ok = diff.CompareTo( BigInteger.Zero ) == 0; */ }