Skip to content

Commit

Permalink
Add AllWords to CorePassSearchSpace + no need to pad MaxPasswordSize …
Browse files Browse the repository at this point in the history
…to be divisible by 4
  • Loading branch information
Coding-Enthusiast committed Nov 11, 2024
1 parent 3abb4b1 commit 9f4fa2e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Src/FinderOuter/Services/SearchSpaces/CorePassSearchSpace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class CorePassSearchSpace : SearchSpaceBase
/// </summary>
public int PasswordLength { get; private set; }
/// <summary>
/// Maximum possible password size in bytes (will be padded to be divisible by 4)
/// Maximum possible password size in bytes
/// </summary>
public int MaxPasswordSize { get; private set; }
public byte[] Encrypted { get; private set; }
Expand All @@ -31,6 +31,8 @@ public class CorePassSearchSpace : SearchSpaceBase
public int[] PermutationLengths { get; private set; }
public int[] PermutationSizes { get; private set; }

public string[] AllWords { get; set; }


public bool Process(string hex, int passLength, out string error)
{
Expand Down Expand Up @@ -213,10 +215,6 @@ public bool SetValues(string[][] result, out string error)
PermutationCounts[index2++] = item.Length;
}

while (MaxPasswordSize % 4 != 0)
{
MaxPasswordSize++;
}
if (MaxPasswordSize > Sha512Fo.BlockByteSize)
{
error = "Password is too long (bigger than SHA512 block size).";
Expand Down

0 comments on commit 9f4fa2e

Please sign in to comment.