Пример #1
0
 public void Dispose()
 {
     Destination = null;
     MiscFuncs.GetRandomBytes(PrivateKey);
     MiscFuncs.GetRandomBytes(SigningPrivateKey);
     PrivateKey        = null;
     SigningPrivateKey = null;
 }
Пример #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
     }
 }
Пример #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
            }
        }
Пример #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);
     }
 }
Пример #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;
     }
 }
Пример #6
0
 public void Dispose()
 {
     Destination = null;
     MiscFuncs.GetRandomBytes(PrivateKey);
     MiscFuncs.GetRandomBytes(SigningPrivateKey);
     PrivateKey = null;
     SigningPrivateKey = null;
 }