Moved EncodeHexString to Util class.

pull/8/head
Nicholas Hastings 12 years ago
parent 4b381f4b16
commit adfea2f0cf

@ -587,7 +587,7 @@ namespace DepotDownloader
foreach (var chunk in neededChunks)
{
string chunkID = EncodeHexString(chunk.ChunkID);
string chunkID = Util.EncodeHexString(chunk.ChunkID);
byte[] encrypted_chunk = cdnClients[0].DownloadDepotChunk(depotId, chunkID);
TotalBytesCompressed += chunk.CompressedLength;
@ -631,12 +631,5 @@ namespace DepotDownloader
Console.WriteLine("Total downloaded: {0} bytes ({1} bytes uncompressed) from {2} depots", TotalBytesCompressed, TotalBytesUncompressed, depots.Count);
}
static string EncodeHexString( byte[] input )
{
return input.Aggregate( new StringBuilder(),
( sb, v ) => sb.Append( v.ToString( "x2" ) )
).ToString();
}
}
}

@ -147,5 +147,12 @@ namespace DepotDownloader
return bytes;
}
public static string EncodeHexString( byte[] input )
{
return input.Aggregate( new StringBuilder(),
( sb, v ) => sb.Append( v.ToString( "x2" ) )
).ToString();
}
}
}

Loading…
Cancel
Save