Author: jwilcox
Date: 2007-09-18 12:25:20 -0400 (Tue, 18 Sep 2007)
New Revision: 85981
Modified:
trunk/ipod-sharp/src/TrackDatabase.cs
Log:
more hash screwage
Modified: trunk/ipod-sharp/src/TrackDatabase.cs
===================================================================
--- trunk/ipod-sharp/src/TrackDatabase.cs 2007-09-18 16:15:53 UTC (rev
85980)
+++ trunk/ipod-sharp/src/TrackDatabase.cs 2007-09-18 16:25:20 UTC (rev
85981)
@@ -1744,6 +1744,8 @@
private short unknownThree = 0x0263;
private ulong deviceId = 0;
+ private byte[] beforeHashBytes = new byte[52];
+
private List<DataSetRecord> datasets = new List<DataSetRecord>();
public int Version = MaxSupportedVersion;
@@ -1792,6 +1794,9 @@
unknownTwo = ToInt16(body, 20);
unknownThree = ToInt16(body, 22);
+ beforeHashBytes = new byte[body.Length - 24];
+ Array.Copy (body, 24, beforeHashBytes, 0, body.Length - 24);
+
if (Version > MaxSupportedVersion)
throw new DatabaseReadException("Detected unsupported database
version {0}", Version);
@@ -1868,8 +1873,7 @@
writer.Write(unknownThree);
if (Version >= 25) {
- writer.Write((short) 1);
- writer.Write(new byte[50]);
+ writer.Write(beforeHashBytes);
writer.Write(Hash);
writer.Write(0);
writer.Write(new byte[76]);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches