# goliate/hidden-tear architecture

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

- Interactive diagram: https://gitdiagram.com/goliate/hidden-tear
- Repository: https://github.com/goliate/hidden-tear

## Overview

Hidden Tear is a Windows Forms file-encryption sample paired with a separate decrypter. The encryptor starts its workflow when its form loads: it creates a password, sends host and password information to a configured web endpoint, recursively encrypts selected files, and writes a desktop note. The decrypter accepts a password and recursively restores `.locked` files. The central implementation is sampled; the README documents the configurable server integration. The graph separates responsibilities within shared Form1.cs files; edges reflect shown calls, with UI initiation marked unverified.

Main entry points: [`hidden-tear/hidden-tear/Form1.cs`](https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Form1.cs) (Encryption workflow), [`hidden-tear-decrypter/hidden-tear-decrypter/Form1.cs`](https://github.com/goliate/hidden-tear/blob/master/hidden-tear-decrypter/hidden-tear-decrypter/Form1.cs) (Decrypter form), [`hidden-tear/hidden-tear/Program.cs`](https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Program.cs) (Encryptor startup), [`hidden-tear-decrypter/hidden-tear-decrypter/Program.cs`](https://github.com/goliate/hidden-tear/blob/master/hidden-tear-decrypter/hidden-tear-decrypter/Program.cs) (Decrypter startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_encrypt["Encryption app"]
  node_encrypt_boot["Encryptor startup<br/>[Program.cs]"]
  node_encrypt_form["Encryptor form<br/>[Form1.cs]"]
  node_workflow["Encryption workflow<br/>[Form1.cs]"]
  node_password["Password creation<br/>[Form1.cs]"]
  node_send["Key reporting<br/>[Form1.cs]"]
  node_traverse["File traversal<br/>[Form1.cs]"]
  node_encrypt_file["File encryption<br/>[Form1.cs]"]
  node_notice["Desktop notice<br/>[Form1.cs]"]
end

subgraph group_decrypt["Decryption app"]
  node_decrypt_boot["Decrypter startup<br/>[Program.cs]"]
  node_decrypt_form["Decrypter form<br/>[Form1.cs]"]
  node_restore_tree["Restore traversal<br/>[Form1.cs]"]
  node_decrypt_file["File decryption<br/>[Form1.cs]"]
end

subgraph group_integrations["External resources"]
  node_server["Configured web server"]
  node_files["Local files"]
end

node_user(("User"))

node_encrypt_boot -->|"opens form"| node_encrypt_form
node_encrypt_form -->|"starts on load"| node_workflow
node_workflow -->|"creates password"| node_password
node_workflow -->|"reports password"| node_send
node_workflow -->|"encrypts directory"| node_traverse
node_workflow -->|"writes notice"| node_notice
node_send -->|"sends host and key"| node_server
node_traverse -->|"encrypts matches"| node_encrypt_file
node_encrypt_file -->|"reads and renames"| node_files
node_notice -->|"writes note"| node_files
node_decrypt_boot -->|"opens form"| node_decrypt_form
node_user -.->|"enters key and clicks"| node_decrypt_form
node_decrypt_form -->|"starts on click"| node_restore_tree
node_restore_tree -->|"restores locked files"| node_decrypt_file
node_decrypt_file -->|"reads and renames"| node_files

click node_encrypt_boot "https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Program.cs"
click node_encrypt_form "https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Form1.cs"
click node_workflow "https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Form1.cs"
click node_password "https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Form1.cs"
click node_send "https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Form1.cs"
click node_traverse "https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Form1.cs"
click node_encrypt_file "https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Form1.cs"
click node_notice "https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Form1.cs"
click node_decrypt_boot "https://github.com/goliate/hidden-tear/blob/master/hidden-tear-decrypter/hidden-tear-decrypter/Program.cs"
click node_decrypt_form "https://github.com/goliate/hidden-tear/blob/master/hidden-tear-decrypter/hidden-tear-decrypter/Form1.cs"
click node_restore_tree "https://github.com/goliate/hidden-tear/blob/master/hidden-tear-decrypter/hidden-tear-decrypter/Form1.cs"
click node_decrypt_file "https://github.com/goliate/hidden-tear/blob/master/hidden-tear-decrypter/hidden-tear-decrypter/Form1.cs"

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_encrypt_boot,node_encrypt_form,node_workflow,node_password,node_send,node_traverse,node_encrypt_file,node_notice,node_user toneBlue
class node_decrypt_boot,node_decrypt_form,node_restore_tree,node_decrypt_file toneAmber
class node_server,node_files toneMint
```

## Components

### Encryption app

- [Encryptor startup](https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Program.cs): `hidden-tear/hidden-tear/Program.cs`
- [Encryptor form](https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Form1.cs): `hidden-tear/hidden-tear/Form1.cs`
- [Encryption workflow](https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Form1.cs): `hidden-tear/hidden-tear/Form1.cs`
- [Password creation](https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Form1.cs): `hidden-tear/hidden-tear/Form1.cs`
- [Key reporting](https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Form1.cs): `hidden-tear/hidden-tear/Form1.cs`
- [File traversal](https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Form1.cs): `hidden-tear/hidden-tear/Form1.cs`
- [File encryption](https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Form1.cs): `hidden-tear/hidden-tear/Form1.cs`
- [Desktop notice](https://github.com/goliate/hidden-tear/blob/master/hidden-tear/hidden-tear/Form1.cs): `hidden-tear/hidden-tear/Form1.cs`

### Decryption app

- [Decrypter startup](https://github.com/goliate/hidden-tear/blob/master/hidden-tear-decrypter/hidden-tear-decrypter/Program.cs): `hidden-tear-decrypter/hidden-tear-decrypter/Program.cs`
- [Decrypter form](https://github.com/goliate/hidden-tear/blob/master/hidden-tear-decrypter/hidden-tear-decrypter/Form1.cs): `hidden-tear-decrypter/hidden-tear-decrypter/Form1.cs`
- [Restore traversal](https://github.com/goliate/hidden-tear/blob/master/hidden-tear-decrypter/hidden-tear-decrypter/Form1.cs): `hidden-tear-decrypter/hidden-tear-decrypter/Form1.cs`
- [File decryption](https://github.com/goliate/hidden-tear/blob/master/hidden-tear-decrypter/hidden-tear-decrypter/Form1.cs): `hidden-tear-decrypter/hidden-tear-decrypter/Form1.cs`

### External resources

- **Configured web server**
- **Local files**

### Other components

- **User**

## Connections

- Encryptor startup → Encryptor form: opens form (evidence: `hidden-tear/hidden-tear/Program.cs`)
- Encryptor form → Encryption workflow: starts on load (evidence: `hidden-tear/hidden-tear/Form1.cs`)
- Encryption workflow → Password creation: creates password (evidence: `hidden-tear/hidden-tear/Form1.cs`)
- Encryption workflow → Key reporting: reports password (evidence: `hidden-tear/hidden-tear/Form1.cs`)
- Encryption workflow → File traversal: encrypts directory (evidence: `hidden-tear/hidden-tear/Form1.cs`)
- Encryption workflow → Desktop notice: writes notice (evidence: `hidden-tear/hidden-tear/Form1.cs`)
- Key reporting → Configured web server: sends host and key (evidence: `hidden-tear/hidden-tear/Form1.cs`)
- File traversal → File encryption: encrypts matches (evidence: `hidden-tear/hidden-tear/Form1.cs`)
- File encryption → Local files: reads and renames (evidence: `hidden-tear/hidden-tear/Form1.cs`)
- Desktop notice → Local files: writes note (evidence: `hidden-tear/hidden-tear/Form1.cs`)
- Decrypter startup → Decrypter form: opens form (evidence: `hidden-tear-decrypter/hidden-tear-decrypter/Program.cs`)
- User → Decrypter form: enters key and clicks
- Decrypter form → Restore traversal: starts on click (evidence: `hidden-tear-decrypter/hidden-tear-decrypter/Form1.cs`)
- Restore traversal → File decryption: restores locked files (evidence: `hidden-tear-decrypter/hidden-tear-decrypter/Form1.cs`)
- File decryption → Local files: reads and renames (evidence: `hidden-tear-decrypter/hidden-tear-decrypter/Form1.cs`)
