Skip to content

Commit

Permalink
Add IC907:61
Browse files Browse the repository at this point in the history
References #27
  • Loading branch information
jglim committed Jul 6, 2023
1 parent c32cadd commit 5cd0978
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
27 changes: 27 additions & 0 deletions UnlockECU/UnlockECU/Security/ArrayReverseAlgo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;

namespace UnlockECU
{
/// <summary>
/// Generic array reverse algo, where the seed/output are of equal length, and output is the reversed seed array
/// </summary>
class ArrayReverseAlgo : SecurityProvider
{
public override bool GenerateKey(byte[] inSeed, byte[] outKey, int accessLevel, List<Parameter> parameters)
{
if (inSeed.Length != outKey.Length)
{
return false;
}
Array.Reverse(inSeed);
Array.Copy(inSeed, outKey, inSeed.Length);
return true;
}
public override string GetProviderName()
{
return "ArrayReverseAlgo";
}
}
}

10 changes: 10 additions & 0 deletions UnlockECU/db.json
Original file line number Diff line number Diff line change
Expand Up @@ -7073,6 +7073,16 @@
}
]
},
{
"EcuName": "IC907",
"Aliases": [],
"AccessLevel": 61,
"SeedLength": 8,
"KeyLength": 8,
"Provider": "ArrayReverseAlgo",
"Origin": "IC907_Unknown_EXPERIMENTAL_@Feezex",
"Parameters": []
},
{
"EcuName": "LeTubeSec",
"Aliases": [],
Expand Down

0 comments on commit 5cd0978

Please sign in to comment.