コード例 #1
0
ファイル: ChainReactionCrypt.cs プロジェクト: Casidi/GARbro
 void ParseListBin(byte[] data)
 {
     using (var mem = new MemoryStream (data))
     using (var input = new StreamReader (mem))
     {
         var converter = new UInt32Converter();
         string line;
         while ((line = input.ReadLine()) != null)
         {
             if (0 == line.Length || '0' != line[0])
                 continue;
             var pair = line.Split (',');
             if (pair.Length > 1)
             {
                 uint hash = (uint)converter.ConvertFromString (pair[0]);
                 uint threshold = (uint)converter.ConvertFromString (pair[1]);
                 EncryptionThresholdMap[hash] = threshold;
             }
         }
     }
 }