# alune0xh/hash-identifier architecture

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

- Interactive diagram: https://gitdiagram.com/alune0xh/hash-identifier
- Repository: https://github.com/alune0xh/hash-identifier

## Overview

This small Python CLI offers three user workflows: identify a hash format, verify plaintext against a hash, and generate a hash. The `main()` loop presents the menu and dispatches to handlers; verification first uses identification to select an algorithm, then compares the computed digest. Hash operations use Python’s standard-library `hashlib`, while identification uses `re`. All product code is in `main.py`; the graph reflects its excerpt and the README’s documented capabilities.

Main entry points: [`main.py`](https://github.com/alune0xh/hash-identifier/blob/main/main.py) (Menu and dispatch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI"]
  node_entry["Menu and dispatch<br/>[main.py]"]
  node_identify_handler["Identify handler<br/>[main.py]"]
  node_verify_handler["Verify handler<br/>[main.py]"]
  node_generate_handler["Generate handler<br/>[main.py]"]
end

subgraph group_hashing["Hash Operations"]
  node_identifier["Hash identifier<br/>[main.py]"]
  node_verifier["Hash verifier<br/>[main.py]"]
  node_generator["Hash generator<br/>[main.py]"]
  node_regex["Python re"]
  node_hashlib["Python hashlib"]
end

node_user(("CLI user"))

node_user -->|"uses"| node_entry
node_entry -->|"dispatches"| node_identify_handler
node_entry -->|"dispatches"| node_verify_handler
node_entry -->|"dispatches"| node_generate_handler
node_identify_handler -->|"describes"| node_identifier
node_verify_handler -->|"identifies"| node_identifier
node_verify_handler -->|"verifies"| node_verifier
node_generate_handler -->|"generates"| node_generator
node_identifier -->|"matches with"| node_regex
node_verifier -->|"hashes with"| node_hashlib
node_generator -->|"hashes with"| node_hashlib

click node_entry "https://github.com/alune0xh/hash-identifier/blob/main/main.py"
click node_identify_handler "https://github.com/alune0xh/hash-identifier/blob/main/main.py"
click node_verify_handler "https://github.com/alune0xh/hash-identifier/blob/main/main.py"
click node_generate_handler "https://github.com/alune0xh/hash-identifier/blob/main/main.py"
click node_identifier "https://github.com/alune0xh/hash-identifier/blob/main/main.py"
click node_verifier "https://github.com/alune0xh/hash-identifier/blob/main/main.py"
click node_generator "https://github.com/alune0xh/hash-identifier/blob/main/main.py"

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_entry,node_identify_handler,node_verify_handler,node_generate_handler,node_user toneBlue
class node_identifier,node_verifier,node_generator,node_regex,node_hashlib toneAmber
```

## Components

### CLI

- [Menu and dispatch](https://github.com/alune0xh/hash-identifier/blob/main/main.py): `main.py`
- [Identify handler](https://github.com/alune0xh/hash-identifier/blob/main/main.py): `main.py`
- [Verify handler](https://github.com/alune0xh/hash-identifier/blob/main/main.py): `main.py`
- [Generate handler](https://github.com/alune0xh/hash-identifier/blob/main/main.py): `main.py`

### Hash Operations

- [Hash identifier](https://github.com/alune0xh/hash-identifier/blob/main/main.py): `main.py`
- [Hash verifier](https://github.com/alune0xh/hash-identifier/blob/main/main.py): `main.py`
- [Hash generator](https://github.com/alune0xh/hash-identifier/blob/main/main.py): `main.py`
- **Python re**
- **Python hashlib**

### Other components

- **CLI user**

## Connections

- CLI user → Menu and dispatch: uses (evidence: `main.py`)
- Menu and dispatch → Identify handler: dispatches (evidence: `main.py`)
- Menu and dispatch → Verify handler: dispatches (evidence: `main.py`)
- Menu and dispatch → Generate handler: dispatches (evidence: `main.py`)
- Identify handler → Hash identifier: describes (evidence: `main.py`)
- Verify handler → Hash identifier: identifies (evidence: `main.py`)
- Verify handler → Hash verifier: verifies (evidence: `main.py`)
- Generate handler → Hash generator: generates (evidence: `main.py`)
- Hash identifier → Python re: matches with (evidence: `main.py`)
- Hash verifier → Python hashlib: hashes with (evidence: `main.py`)
- Hash generator → Python hashlib: hashes with (evidence: `main.py`)
