# rouninmedia/obfuscate-deobfuscate architecture

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

- Interactive diagram: https://gitdiagram.com/rouninmedia/obfuscate-deobfuscate
- Repository: https://github.com/rouninmedia/obfuscate-deobfuscate

## Overview

This is a small cross-language string-obfuscation utility, not an encryption library. Callers can obfuscate or deobfuscate strings using either PHP or JavaScript; the implementations segment data, apply repeated Base64 encoding and reversal, and add framing needed for decoding. The README documents interoperability between server-side and browser-side use. The graph focuses on the four runtime functions; no separate internal modules are present.

Main entry points: [`deobfuscate.php`](https://github.com/rouninmedia/obfuscate-deobfuscate/blob/master/deobfuscate.php) (PHP Deobfuscate), [`deobfuscate.js`](https://github.com/rouninmedia/obfuscate-deobfuscate/blob/master/deobfuscate.js) (JavaScript Deobfuscate), [`obfuscate.php`](https://github.com/rouninmedia/obfuscate-deobfuscate/blob/master/obfuscate.php) (PHP Obfuscate), [`obfuscate.js`](https://github.com/rouninmedia/obfuscate-deobfuscate/blob/master/obfuscate.js) (JavaScript Obfuscate)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_caller(("Caller"))
node_php_obfuscate["PHP Obfuscate<br/>[obfuscate.php]"]
node_js_obfuscate["JavaScript Obfuscate<br/>[obfuscate.js]"]
node_php_deobfuscate["PHP Deobfuscate<br/>[deobfuscate.php]"]
node_js_deobfuscate["JavaScript Deobfuscate<br/>[deobfuscate.js]"]
node_obfuscated_string["Obfuscated String"]
node_plain_string["Plain String"]

node_caller -->|"calls"| node_php_obfuscate
node_caller -->|"calls"| node_js_obfuscate
node_caller -->|"calls"| node_php_deobfuscate
node_caller -->|"calls"| node_js_deobfuscate
node_php_obfuscate -->|"produces"| node_obfuscated_string
node_js_obfuscate -->|"produces"| node_obfuscated_string
node_obfuscated_string -->|"decodes"| node_php_deobfuscate
node_obfuscated_string -->|"decodes"| node_js_deobfuscate
node_php_deobfuscate -->|"produces"| node_plain_string
node_js_deobfuscate -->|"produces"| node_plain_string

click node_php_obfuscate "https://github.com/rouninmedia/obfuscate-deobfuscate/blob/master/obfuscate.php"
click node_js_obfuscate "https://github.com/rouninmedia/obfuscate-deobfuscate/blob/master/obfuscate.js"
click node_php_deobfuscate "https://github.com/rouninmedia/obfuscate-deobfuscate/blob/master/deobfuscate.php"
click node_js_deobfuscate "https://github.com/rouninmedia/obfuscate-deobfuscate/blob/master/deobfuscate.js"

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_caller,node_obfuscated_string,node_plain_string toneIndigo
class node_php_obfuscate,node_js_obfuscate,node_php_deobfuscate,node_js_deobfuscate toneTeal
```

## Components

### Other components

- **Caller**
- [PHP Obfuscate](https://github.com/rouninmedia/obfuscate-deobfuscate/blob/master/obfuscate.php): `obfuscate.php`
- [JavaScript Obfuscate](https://github.com/rouninmedia/obfuscate-deobfuscate/blob/master/obfuscate.js): `obfuscate.js`
- [PHP Deobfuscate](https://github.com/rouninmedia/obfuscate-deobfuscate/blob/master/deobfuscate.php): `deobfuscate.php`
- [JavaScript Deobfuscate](https://github.com/rouninmedia/obfuscate-deobfuscate/blob/master/deobfuscate.js): `deobfuscate.js`
- **Obfuscated String**
- **Plain String**

## Connections

- Caller → PHP Obfuscate: calls
- Caller → JavaScript Obfuscate: calls
- Caller → PHP Deobfuscate: calls
- Caller → JavaScript Deobfuscate: calls
- PHP Obfuscate → Obfuscated String: produces
- JavaScript Obfuscate → Obfuscated String: produces
- Obfuscated String → PHP Deobfuscate: decodes
- Obfuscated String → JavaScript Deobfuscate: decodes
- PHP Deobfuscate → Plain String: produces
- JavaScript Deobfuscate → Plain String: produces
