From 03780702638e761d1682dda5f764c47db1b5815a Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 2 Feb 2017 19:58:47 -0800 Subject: [PATCH] Fix Memecrypto private key endianness --- PKHeX/Saves/Substructures/MemeCrypto.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/PKHeX/Saves/Substructures/MemeCrypto.cs b/PKHeX/Saves/Substructures/MemeCrypto.cs index 92e03f600..1b783acf5 100644 --- a/PKHeX/Saves/Substructures/MemeCrypto.cs +++ b/PKHeX/Saves/Substructures/MemeCrypto.cs @@ -330,7 +330,7 @@ namespace PKHeX.Core private static readonly byte[] DER_C = "307C300D06092A864886F70D0101010500036B003068026100CAC0514D4B6A3F70771C461B01BDE3B6D47A0ADA078074DDA50703D8CC28089379DA64FB3A34AD3435D24F7331383BDADC4877662EFB555DA2077619B70AB0342EBE6EE888EBF3CF4B7E8BCCA95C61E993BDD6104C10D11115DC84178A5894350203010001".ToByteArray(); private static readonly byte[] DER_D = "307C300D06092A864886F70D0101010500036B003068026100B906466740F5A9428DA84B418C7FA6146F7E24C783373D671F9214B40948A4A317C1A4460111B45D2DADD093815401573E52F0178890D35CBD95712EFAAE0D20AD47187648775CD9569431B1FC3C784113E3A48436D30B2CD162218D6781F5ED0203010001".ToByteArray(); - private static readonly byte[] D_3 = "775455668FFF3CBA3026C2D0B26B8085895958341157AEB03B6B0495EE57803E2186EB6CB2EB62A71DF18A3C9C6579077670961B3A6102DABE5A194AB58C3250AED597FC78978A326DB1D7B28DCCCB2A3E014EDBD397AD33B8F28CD525054251".ToByteArray(); + private static readonly byte[] D_3 = "00775455668FFF3CBA3026C2D0B26B8085895958341157AEB03B6B0495EE57803E2186EB6CB2EB62A71DF18A3C9C6579077670961B3A6102DABE5A194AB58C3250AED597FC78978A326DB1D7B28DCCCB2A3E014EDBD397AD33B8F28CD525054251".ToByteArray(); private static readonly MemeKey[] MemeKeys = { @@ -369,6 +369,8 @@ namespace PKHeX.Core Array.Copy(der, 0x7B, E, 0, 3); Array.Reverse(N); Array.Reverse(E); + if (D != null) + Array.Reverse(D); } }