# dorovon/name_hash_bruteforcer architecture

> Architecture diagram of the GitHub repository dorovon/name_hash_bruteforcer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dorovon/name_hash_bruteforcer
- Repository: https://github.com/dorovon/name_hash_bruteforcer

## Overview

name_hash_bruteforcer is a command-line search tool for recovering unknown WoW root-file names from their hashes. The main workflow accepts target hashes and patterns or listfile-derived candidates, expands wildcard and dictionary positions, computes candidate hashes, and reports matches with progress and rate. CPU hashing is built in, with optional OpenCL acceleration. The excerpts show the main program’s input setup and GPU batch callbacks; other README-described modes are retained, but their internal dispatch details are not fully sampled.

Main entry points: [`src/main.cpp`](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/main.cpp) (Search coordinator), [`src/gpu.h`](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/gpu.h) (GPU management), [`src/dictionary.h`](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/dictionary.h) (Dictionary words), [`src/hash_string.h`](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/hash_string.h) (Candidate strings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Inputs and candidates"]
  node_hash_inputs["Hash targets<br/>[main.cpp]"]
  node_pattern_inputs["Pattern inputs<br/>[main.cpp]"]
  node_listfile["Listfile strategies<br/>[main.cpp]"]
  node_dictionaries["Dictionary words<br/>[dictionary.h]"]
end

subgraph group_search["Search and hashing"]
  node_main["Search coordinator<br/>[main.cpp]"]
  node_candidate["Candidate strings<br/>[hash_string.h]"]
  node_cpu_search["CPU search<br/>[main.cpp]"]
  node_hashlittle["HashLittle2<br/>[hashlittle2.h]"]
  node_sstr["SStrHash<br/>[sstrhash.h]"]
end

subgraph group_accel["GPU acceleration"]
  node_gpu_search["GPU batches<br/>[main.cpp]"]
  node_gpu_runtime["OpenCL runtime<br/>[gpu.cpp]"]
  node_gpu_api["GPU management<br/>[gpu.h]"]
  node_kernels["OpenCL kernels<br/>[kernels.h]"]
end

subgraph group_output["Results and utilities"]
  node_progress["Progress reporting<br/>[progress_bar.h]"]
  node_utilities["File and text utilities<br/>[util.h]"]
  node_results["Matched names<br/>[main.cpp]"]
end

node_user(("CLI user"))

node_user -->|"runs"| node_main
node_main -->|"reads targets"| node_hash_inputs
node_main -->|"reads patterns"| node_pattern_inputs
node_main -->|"tries strategies"| node_listfile
node_main -->|"loads words"| node_dictionaries
node_main -->|"prepares candidates"| node_candidate
node_main -->|"searches combinations"| node_cpu_search
node_cpu_search -->|"computes hash"| node_hashlittle
node_cpu_search -->|"computes hash"| node_sstr
node_main -->|"enables GPU"| node_gpu_search
node_gpu_search -->|"configures batches"| node_gpu_api
node_gpu_api -->|"executes kernels"| node_gpu_runtime
node_gpu_search -.->|"selects kernels"| node_kernels
node_main -->|"reports progress"| node_progress
node_main -->|"prints matches"| node_results
node_main -->|"uses helpers"| node_utilities

click node_main "https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/main.cpp"
click node_hash_inputs "https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/main.cpp"
click node_pattern_inputs "https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/main.cpp"
click node_listfile "https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/main.cpp"
click node_dictionaries "https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/dictionary.h"
click node_candidate "https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/hash_string.h"
click node_cpu_search "https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/main.cpp"
click node_hashlittle "https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/hashlittle2.h"
click node_sstr "https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/sstrhash.h"
click node_gpu_search "https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/main.cpp"
click node_gpu_runtime "https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/gpu.cpp"
click node_gpu_api "https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/gpu.h"
click node_kernels "https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/cl/kernels.h"
click node_progress "https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/progress_bar.h"
click node_utilities "https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/util.h"
click node_results "https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/main.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_hash_inputs,node_pattern_inputs,node_listfile,node_dictionaries,node_user toneBlue
class node_main,node_candidate,node_cpu_search,node_hashlittle,node_sstr toneAmber
class node_gpu_search,node_gpu_runtime,node_gpu_api,node_kernels toneMint
class node_progress,node_utilities,node_results toneRose
```

## Components

### Inputs and candidates

- [Hash targets](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/main.cpp): `src/main.cpp`
- [Pattern inputs](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/main.cpp): `src/main.cpp`
- [Listfile strategies](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/main.cpp): `src/main.cpp`
- [Dictionary words](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/dictionary.h): `src/dictionary.h`

### Search and hashing

- [Search coordinator](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/main.cpp): `src/main.cpp`
- [Candidate strings](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/hash_string.h): `src/hash_string.h`
- [CPU search](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/main.cpp): `src/main.cpp`
- [HashLittle2](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/hashlittle2.h): `src/hashlittle2.h`
- [SStrHash](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/sstrhash.h): `src/sstrhash.h`

### GPU acceleration

- [GPU batches](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/main.cpp): `src/main.cpp`
- [OpenCL runtime](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/gpu.cpp): `src/gpu.cpp`
- [GPU management](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/gpu.h): `src/gpu.h`
- [OpenCL kernels](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/cl/kernels.h): `src/cl/kernels.h`

### Results and utilities

- [Progress reporting](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/progress_bar.h): `src/progress_bar.h`
- [File and text utilities](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/util.h): `src/util.h`
- [Matched names](https://github.com/dorovon/name_hash_bruteforcer/blob/main/src/main.cpp): `src/main.cpp`

### Other components

- **CLI user**

## Connections

- CLI user → Search coordinator: runs (evidence: `README.md`)
- Search coordinator → Hash targets: reads targets (evidence: `src/main.cpp`)
- Search coordinator → Pattern inputs: reads patterns (evidence: `README.md`)
- Search coordinator → Listfile strategies: tries strategies (evidence: `README.md`)
- Search coordinator → Dictionary words: loads words (evidence: `src/main.cpp`)
- Search coordinator → Candidate strings: prepares candidates (evidence: `src/main.cpp`)
- Search coordinator → CPU search: searches combinations (evidence: `README.md`)
- CPU search → HashLittle2: computes hash (evidence: `src/main.cpp`)
- CPU search → SStrHash: computes hash (evidence: `src/main.cpp`)
- Search coordinator → GPU batches: enables GPU (evidence: `README.md`)
- GPU batches → GPU management: configures batches (evidence: `src/main.cpp`)
- GPU management → OpenCL runtime: executes kernels (evidence: `src/gpu.cpp`)
- GPU batches → OpenCL kernels: selects kernels (evidence: `src/main.cpp`)
- Search coordinator → Progress reporting: reports progress (evidence: `src/main.cpp`)
- Search coordinator → Matched names: prints matches (evidence: `README.md`)
- Search coordinator → File and text utilities: uses helpers (evidence: `src/main.cpp`)
