Add the MD5 hash of null as a constant
This commit is contained in:
@@ -11,6 +11,7 @@ namespace BuildIRD
|
|||||||
byte[] discID = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
byte[] discID = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||||
byte[] discPIC = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
byte[] discPIC = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||||
IRD ird = new IRD("Z:", discKey, discID, discPIC);
|
IRD ird = new IRD("Z:", discKey, discID, discPIC);
|
||||||
|
ird.Write("./ ird.ird");
|
||||||
Console.WriteLine(ird.HeaderLength);
|
Console.WriteLine(ird.HeaderLength);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-2
@@ -20,6 +20,11 @@ namespace LibIRD
|
|||||||
///
|
///
|
||||||
public static readonly byte[] Magic = new byte[] { 0x33, 0x49, 0x52, 0x44 };
|
public static readonly byte[] Magic = new byte[] { 0x33, 0x49, 0x52, 0x44 };
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// MD5 hash of null
|
||||||
|
/// </summary>
|
||||||
|
public static readonly byte[] NullMD5 = new byte[] {0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04, 0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e};
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// AES encryption/decryption keys and initial values
|
/// AES encryption/decryption keys and initial values
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -382,8 +387,6 @@ namespace LibIRD
|
|||||||
{
|
{
|
||||||
// Keep track of the little-endian 32-bit "IEEE 802.3" CRC value
|
// Keep track of the little-endian 32-bit "IEEE 802.3" CRC value
|
||||||
Crc32 crcStream = new Crc32();
|
Crc32 crcStream = new Crc32();
|
||||||
// TODO: Run as an async Task?
|
|
||||||
crcStream.Append(outStream);
|
|
||||||
|
|
||||||
// Write IRD data to stream in order
|
// Write IRD data to stream in order
|
||||||
using (BinaryWriter bw = new BinaryWriter(outStream))
|
using (BinaryWriter bw = new BinaryWriter(outStream))
|
||||||
|
|||||||
Reference in New Issue
Block a user