Esempio n. 1
0
 public void Dispose()
 {
     Destination = null;
     MiscFuncs.GetRandomBytes(PrivateKey);
     MiscFuncs.GetRandomBytes(SigningPrivateKey);
     PrivateKey        = null;
     SigningPrivateKey = null;
 }
Esempio n. 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
     }
 }
Esempio n. 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
            }
        }
Esempio n. 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);
     }
 }
Esempio n. 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;
     }
 }
Esempio n. 6
0
 public void Dispose()
 {
     Destination = null;
     MiscFuncs.GetRandomBytes(PrivateKey);
     MiscFuncs.GetRandomBytes(SigningPrivateKey);
     PrivateKey = null;
     SigningPrivateKey = null;
 }