mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Added support for bigendian UUID/Guid
This commit is contained in:
@@ -645,5 +645,16 @@ namespace DiscImageChef
|
|||||||
{
|
{
|
||||||
return !IsLittleEndian ? BitConverter.ToUInt64(value, startIndex) : BitConverter.ToUInt64(value.Reverse().ToArray(), value.Length - sizeof(UInt64) - startIndex);
|
return !IsLittleEndian ? BitConverter.ToUInt64(value, startIndex) : BitConverter.ToUInt64(value.Reverse().ToArray(), value.Length - sizeof(UInt64) - startIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Guid ToGuid(byte[] value, int startIndex)
|
||||||
|
{
|
||||||
|
return new Guid(BigEndianBitConverter.ToUInt32(value, 0 + startIndex),
|
||||||
|
BigEndianBitConverter.ToUInt16(value, 4 + startIndex),
|
||||||
|
BigEndianBitConverter.ToUInt16(value, 6 + startIndex),
|
||||||
|
value[8 + startIndex + 0], value[8 + startIndex + 1],
|
||||||
|
value[8 + startIndex + 2], value[8 + startIndex + 3],
|
||||||
|
value[8 + startIndex + 5], value[8 + startIndex + 5],
|
||||||
|
value[8 + startIndex + 6], value[8 + startIndex + 7]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,8 @@
|
|||||||
|
2015-04-21 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
|
* BigEndianBitConverter.cs:
|
||||||
|
Added support for bigendian UUID/Guid
|
||||||
|
|
||||||
2015-04-20 Natalia Portillo <claunia@claunia.com>
|
2015-04-20 Natalia Portillo <claunia@claunia.com>
|
||||||
|
|
||||||
* Plugins/AmigaDOS.cs:
|
* Plugins/AmigaDOS.cs:
|
||||||
|
|||||||
Reference in New Issue
Block a user