pure c# now.

This commit is contained in:
Chris Forbes
2009-10-07 22:24:37 +13:00
parent eabc464410
commit 1cf7fdaf06
8 changed files with 527 additions and 678 deletions

View File

@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.Linq;
namespace OpenRa.FileFormats
{
@@ -18,11 +19,6 @@ namespace OpenRa.FileFormats
readonly long dataStart;
readonly Stream s;
//public ICollection<PackageEntry> Content
//{
// get { return index.AsReadOnly(); }
//}
public static Dictionary<K, V> MakeDict<K,V>(IEnumerable<V> values, Converter<V, K> keyFunc)
{
var dict = new Dictionary<K, V>();
@@ -63,7 +59,7 @@ namespace OpenRa.FileFormats
{
BinaryReader reader = new BinaryReader(s);
byte[] keyblock = reader.ReadBytes(80);
byte[] blowfishKey = MixDecrypt.MixDecrypt.BlowfishKey(keyblock);
byte[] blowfishKey = new BlowfishKeyProvider().DecryptKey(keyblock);
uint[] h = ReadUints(reader, 2);