# modeverv/setpasstoexceldotnet architecture

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

- Interactive diagram: https://gitdiagram.com/modeverv/setpasstoexceldotnet
- Repository: https://github.com/modeverv/setpasstoexceldotnet

## Overview

ExcelEncryptor is a small .NET library for encrypting and decrypting OOXML workbooks. A caller supplies workbook bytes or a file and a password; the library produces an Excel-compatible encrypted file, which callers can later decrypt. Encryption validates OOXML ZIP contents and writes the encrypted package through OpenMcdf; decryption reads that package and restores the workbook. The source excerpts show these format and storage operations, but omit some internal call flow, so the graph avoids inferring links between algorithm stages.

Main entry points: [`src/ExcelEncryptor/Encrypt.cs`](https://github.com/modeverv/setpasstoexceldotnet/blob/master/src/ExcelEncryptor/Encrypt.cs) (Encrypt workbooks), [`src/ExcelEncryptor/Encrypt.Decryptor.cs`](https://github.com/modeverv/setpasstoexceldotnet/blob/master/src/ExcelEncryptor/Encrypt.Decryptor.cs) (Decrypt workbooks)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_caller(("Library caller"))
node_encrypt["Encrypt workbooks<br/>[Encrypt.cs]"]
node_decrypt["Decrypt workbooks"]
node_ooxml["OOXML workbook"]
node_encrypted["Encrypted workbook"]
node_cfb["OpenMcdf storage"]

node_caller -->|"encrypts via"| node_encrypt
node_ooxml -->|"supplies workbook"| node_encrypt
node_encrypt -->|"produces file"| node_encrypted
node_encrypt -->|"writes package"| node_cfb
node_caller -->|"decrypts via"| node_decrypt
node_encrypted -->|"supplies file"| node_decrypt
node_decrypt -->|"reads package"| node_cfb
node_decrypt -.->|"returns workbook"| node_ooxml

click node_encrypt "https://github.com/modeverv/setpasstoexceldotnet/blob/master/src/ExcelEncryptor/Encrypt.cs"
click node_decrypt "https://github.com/modeverv/setpasstoexceldotnet/blob/master/src/ExcelEncryptor/Encrypt.Decryptor.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_caller,node_ooxml,node_encrypted toneIndigo
class node_encrypt,node_decrypt toneTeal
class node_cfb toneAmber
```

## Components

### Other components

- **Library caller**
- [Encrypt workbooks](https://github.com/modeverv/setpasstoexceldotnet/blob/master/src/ExcelEncryptor/Encrypt.cs): `src/ExcelEncryptor/Encrypt.cs`
- [Decrypt workbooks](https://github.com/modeverv/setpasstoexceldotnet/blob/master/src/ExcelEncryptor/Encrypt.Decryptor.cs): `src/ExcelEncryptor/Encrypt.Decryptor.cs`
- **OOXML workbook**
- **Encrypted workbook**
- **OpenMcdf storage**

## Connections

- Library caller → Encrypt workbooks: encrypts via (evidence: `README.md`)
- OOXML workbook → Encrypt workbooks: supplies workbook (evidence: `README.md`)
- Encrypt workbooks → Encrypted workbook: produces file (evidence: `README.md`)
- Encrypt workbooks → OpenMcdf storage: writes package (evidence: `src/ExcelEncryptor/Encrypt.cs`)
- Library caller → Decrypt workbooks: decrypts via (evidence: `README.md`)
- Encrypted workbook → Decrypt workbooks: supplies file (evidence: `src/ExcelEncryptor/Encrypt.Decryptor.cs`)
- Decrypt workbooks → OpenMcdf storage: reads package (evidence: `src/ExcelEncryptor/Encrypt.Decryptor.cs`)
- Decrypt workbooks → OOXML workbook: returns workbook
