java – How to make appropriate changes to the bruteForce method to crack password hashes

I want to crack the password hash.
This is my data with which I want to display the username and passwords. Please ignore if my edit is wrong. I'm new to the stack flow.

Thank you in advance.

Enter the image description here

This is my code

import java.io.FileReader;
import java.io.Console;
Import java.util.Scanner;
import java.security.MessageDigest;
import java.security.SecureRandom;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.SecretKey;
import javax.xml.bind.annotation.adapters.HexBinaryAdapter;
import com.opencsv.CSVReader;

public class LabSecurity {
private static final sign[] characters = {a a,, b b,, # c,, & d #, & e & # 39 ;, & # 39; a & # 39 ;, & # 39; F f,, g g,, h h #, & i #, j j & # 39 ;, g & gt;
& Kd ;, & # 39 ;, & 39 ;, & 39 ;, & 39 ;, & 39 ;, & 39 ;, & 39 ;, & 39 ;, & 39; # 39 ;, & # 39; q & # 39 ;, & # 39 ;, & # 39 ;, & # 39 ;, & 39; & # 39 ;, & 39 ;, & 39; # 39; v & # 39 ;, w & # 39 ;, & # 39; x & # 39 ;, & # 39; y & # 39 ;, & # 39; z & # 39;};

private static final int HASH_ITERS = 10000;
private static final int SALT_LENGTH = 32;
private static final int HASH_LENGTH = 512;

private boolean found;
private string match;

private MessageDigest md5;
private byte[] byteRepresentation;
private byte[] hash;
private string strHexHash;
private HexBinaryAdapter hba;

/ **
* Constructor for objects of class LabSecurity
* /
public LabSecurity () {
To attempt {
md5 = MessageDigest.getInstance ("MD5");
hba = new HexBinaryAdapter ();
} catch (NoSuchAlgorithmException nsae) {
}
}

public void tryMD5 () {
To attempt {
String str;
do {
System.out.println ("Enter a string to generate the MD5 hash (press Enter to exit)");
Scanner terminalInput = new scanner (System.in);
str = terminalInput.nextLine ();
if (! str.equals ("")) {
System.out.println (encodeMD5 (str));
}
} while (! str.equals (""));
} catch (exception e) {
}

}

private string encodeMD5 (last string input) raises Exception {.
byteRepresentation = input.getBytes ("UTF-8");
hash = md5.digest (byteRepresentation);
strHexHash = hba.marshal (hash);
return strHexHash;
}

public void bruteForce (closing string) {
To attempt {
CSVReader-Reader = new CSVReader (new FileReader (input));
string[] next line;
reader.readNext ();
System.out.println ("brute-force");
while ((nextLine = reader.readNext ())! = null) {
System.out.print (nextLine[0] + "" + nextLine[1] + "");
found = wrong;
String password = "not found";
if found) {
Password = match;
}
System.out.println (password);
}
} catch (exception e) {
}
}

/ **
* Recursively examine all passwords that are shorter or equal to the parameters ,
* consisting of characters from the  class variable
* to find the password that has the same MD5 hash as a parameter ,
* The  The global variable must be initialized to false before the method is called.
* Results are stored in  and  global variables.
* 

* bruteForceRecursive (10, 0, "", ) tries passwords * of 10 or less characters until a character containing hashes is found or * All passwords were tried unsuccessfully. * / private void bruteForceRecursive (final int-length, last int-position, last string baseString, last string hash) throws exception { for (int i = 0; i <char.length +! found; i ++) { Try String = baseString + characters[i]; found = hash.equals (encodeMD5 (experiment)); if found) { Match = trial; } else { if (position <length - 1) { bruteForceRecursive (length, position + 1, try, hash); } } } } public String generateHash (String password) { String result = ""; Return result; } private byte[] hashPassword (final character)[] Password, last byte[] Salt, last int. iterations, last int. keyLength) { To attempt { SecretKeyFactory skf = SecretKeyFactory.getInstance ("PBKDF2WithHmacSHA512"); PBEKeySpec spec = new PBEKeySpec (password, salt, iterations, key length); SecretKey key = skf.generateSecret (spec); byte[] res = key.getEncoded (); res res; } catch (NoSuchAlgorithmException | InvalidKeySpecException e) { Throw new RuntimeException (s); } } }