コード例 #1
0
ファイル: SamHelper.cs プロジェクト: z0rg1nc/SamHelperLib
 public void Dispose()
 {
     Destination = null;
     MiscFuncs.GetRandomBytes(PrivateKey);
     MiscFuncs.GetRandomBytes(SigningPrivateKey);
     PrivateKey        = null;
     SigningPrivateKey = null;
 }
コード例 #2
0
ファイル: SamHelper.cs プロジェクト: z0rg1nc/SamHelperLib
 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
ファイル: SamHelper.cs プロジェクト: z0rg1nc/SamHelperLib
        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
ファイル: SamHelper.cs プロジェクト: z0rg1nc/SamHelperLib
 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
ファイル: SamHelper.cs プロジェクト: z0rg1nc/SamHelperLib
 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
ファイル: SamHelper.cs プロジェクト: z0rg1nc/SamHelperLib
 public void Dispose()
 {
     Destination = null;
     MiscFuncs.GetRandomBytes(PrivateKey);
     MiscFuncs.GetRandomBytes(SigningPrivateKey);
     PrivateKey = null;
     SigningPrivateKey = null;
 }