Example #1
0
 public void Dispose()
 {
     Destination = null;
     MiscFuncs.GetRandomBytes(PrivateKey);
     MiscFuncs.GetRandomBytes(SigningPrivateKey);
     PrivateKey        = null;
     SigningPrivateKey = null;
 }
Example #2
0
 private void LoadData(Stream inStream)
 {
     var converter = new BigEndianBitConverter();
     using (var endianReader = new EndianBinaryReader(converter, inStream))
     {
         Destination = new I2PDestination(endianReader);
         PrivateKey = endianReader.ReadBytesOrThrow(PrivateKeyLength);
         SigningPrivateKey = endianReader.ReadBytes(8192); //enough i think
     }
 }
Example #3
0
        private void LoadData(Stream inStream)
        {
            var converter = new BigEndianBitConverter();

            using (var endianReader = new EndianBinaryReader(converter, inStream))
            {
                Destination       = new I2PDestination(endianReader);
                PrivateKey        = endianReader.ReadBytesOrThrow(PrivateKeyLength);
                SigningPrivateKey = endianReader.ReadBytes(8192); //enough i think
            }
        }
Example #4
0
 public static bool IsDestinationStringValid(
     string destination
     )
 {
     if (string.IsNullOrWhiteSpace(destination))
     {
         return(false);
     }
     try
     {
         var dest = new I2PDestination(destination);
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Example #5
0
 public static bool IsDestinationStringValid(
     string destination
 )
 {
     if (string.IsNullOrWhiteSpace(destination))
         return false;
     try
     {
         var dest = new I2PDestination(destination);
         return true;
     }
     catch (Exception)
     {
         return false;
     }
 }
Example #6
0
 public void Dispose()
 {
     Destination = null;
     MiscFuncs.GetRandomBytes(PrivateKey);
     MiscFuncs.GetRandomBytes(SigningPrivateKey);
     PrivateKey = null;
     SigningPrivateKey = null;
 }