mirror of
https://github.com/SabreTools/NDecrypt.git
synced 2026-02-07 05:40:06 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5c6b303d41 | ||
|
|
0800d93d22 |
@@ -9,6 +9,9 @@ namespace ThreeDS.Data
|
||||
public static byte[] ExefsCounter = new byte[] { 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
public static byte[] RomfsCounter = new byte[] { 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
// Note: BigInteger requires the 0x00 at the end of each string in order to preserve the sign value
|
||||
// Note: BigInteger requires that the values be in little endian format, the values in
|
||||
|
||||
// Big Endian - 0x1F, 0xF9, 0xE9, 0xAA, 0xC5, 0xFE, 0x04, 0x08, 0x02, 0x45, 0x91, 0xDC, 0x5D, 0x52, 0x76, 0x8A
|
||||
// Little Endian - 0x8A, 0x76, 0x52, 0x5D, 0xDC, 0x91, 0x45, 0x02, 0x08, 0x04, 0xFE, 0xC5, 0xAA, 0xE9, 0xF9, 0x1F
|
||||
public static BigInteger AESHardwareConstant = new BigInteger(new byte[] { 0x8A, 0x76, 0x52, 0x5D, 0xDC, 0x91, 0x45, 0x02, 0x08, 0x04, 0xFE, 0xC5, 0xAA, 0xE9, 0xF9, 0x1F });
|
||||
@@ -37,7 +40,7 @@ namespace ThreeDS.Data
|
||||
|
||||
#endregion
|
||||
|
||||
#region Dev Keys (Must be converted to LE)
|
||||
#region Dev Keys
|
||||
|
||||
// Dev KeyX 0x18 (New 3DS 9.3)
|
||||
// Big Endian - 0x30, 0x4B, 0xF1, 0x46, 0x83, 0x72, 0xEE, 0x64, 0x11, 0x5E, 0xBD, 0x40, 0x93, 0xD8, 0x42, 0x76
|
||||
|
||||
@@ -183,7 +183,7 @@ namespace ThreeDS
|
||||
|
||||
if (datalenB > 0)
|
||||
{
|
||||
g.Write(exefsctrmode2C.ProcessBytes(exefsctrmode.ProcessBytes(f.ReadBytes((int)datalenB))));
|
||||
g.Write(exefsctrmode2C.DoFinal(exefsctrmode.DoFinal(f.ReadBytes((int)datalenB))));
|
||||
g.Flush();
|
||||
}
|
||||
|
||||
@@ -571,13 +571,11 @@ namespace ThreeDS
|
||||
|
||||
private static string ToBytes(int num)
|
||||
{
|
||||
string numstr = "";
|
||||
int tmp = num;
|
||||
|
||||
string numstr = string.Empty;
|
||||
while (numstr.Length < 16)
|
||||
{
|
||||
numstr += (char)(tmp & 0xFF);
|
||||
tmp >>= 8;
|
||||
numstr += (char)(num & 0xFF);
|
||||
num >>= 8;
|
||||
}
|
||||
|
||||
return numstr;
|
||||
|
||||
Reference in New Issue
Block a user