How kjyoffice/onefileencryptdecrypt works
OneFileEncryptDecrypt is a .NET command-line tool for encrypting and decrypting individual files. The principal workflow parses an encrypt/decrypt command, builds a work order, then processes the file into or out of a packaged encrypted result; the README documents AES-256 CBC and GCM modes. Supporting layers cover temporary work paths, metadata and integrity checks, cryptographic helpers, file operations, and console progress/messages. The excerpts establish the CLI and parts of the encrypt/decrypt flows; some internal dispatch and algorithm calls are not shown, so those links are omitted or marked unverified.
Main entry points: Program.cs Program entry · EncryptWork_AES256.cs Encrypt processing · DecryptWork_AES256.cs Decrypt processing · DecryptWork.cs Decrypt workflow
Components 21
Command line
- Program entry
OneFileEncryptDecrypt/Program.cs - Command options
OneFileEncryptDecrypt/XCommand/CryptoCommand.cs
File workflows
- Encrypt workflow
OneFileEncryptDecrypt/XWork/EncryptWork.cs - Encrypt processing
OneFileEncryptDecrypt/XWork/EncryptWork_AES256.cs - Decrypt workflow
OneFileEncryptDecrypt/XWork/DecryptWork.cs - Decrypt processing
OneFileEncryptDecrypt/XWork/DecryptWork_AES256.cs
Cryptography
- Key derivation
OneFileEncryptDecrypt/XCrypto/CryptoKeySet.cs - Hash and HMAC
OneFileEncryptDecrypt/XCrypto/HashWork.cs - AES CBC
OneFileEncryptDecrypt/XCrypto/AES256CBC.cs - AES GCM
OneFileEncryptDecrypt/XCrypto/AES256GCM.cs
Data and support
- App settings
OneFileEncryptDecrypt/XAppSettings/AppSettingsX.cs - Localized messages
OneFileEncryptDecrypt/XMessage/WorkMessageSet.cs - Console output
OneFileEncryptDecrypt/XConsole/ConsoleWriteMessageSet.cs - Crypto work order
OneFileEncryptDecrypt/XModel/CryptoWorkOrder.cs - Work file paths
OneFileEncryptDecrypt/XModel/CryptoXFilePath.cs - Crypto records
OneFileEncryptDecrypt/XModel - JSON conversion
OneFileEncryptDecrypt/XWork/JsonWork.cs - File operations
OneFileEncryptDecrypt/XWork/FileWork.cs - Crypto constants
OneFileEncryptDecrypt/XValue/ProcessValue.cs - Progress tracking
OneFileEncryptDecrypt/XModel/ProgressViewer.cs
Other components
- CLI user
Connections 32
- CLI user → Program entry: runs
README.md - Program entry → App settings: creates
OneFileEncryptDecrypt/Program.cs - Program entry → Console output: creates
OneFileEncryptDecrypt/Program.cs - Program entry → Command options: registers
OneFileEncryptDecrypt/Program.cs - Program entry → Encrypt workflow: dispatches encrypt
OneFileEncryptDecrypt/Program.cs - Program entry → Decrypt workflow: dispatches decrypt
OneFileEncryptDecrypt/Program.cs - Command options → Crypto work order: builds order
OneFileEncryptDecrypt/XCommand/CryptoCommand.cs - Command options → App settings: validates with
OneFileEncryptDecrypt/XCommand/CryptoCommand.cs - App settings → Localized messages: creates
OneFileEncryptDecrypt/XAppSettings/AppSettingsX.cs - App settings → Work file paths: creates work paths
OneFileEncryptDecrypt/XAppSettings/AppSettingsX.cs - App settings → Crypto constants: reads constants
OneFileEncryptDecrypt/XAppSettings/AppSettingsX.cs - Encrypt workflow → Encrypt processing: delegates to
- Decrypt workflow → File operations: extracts archive
OneFileEncryptDecrypt/XWork/DecryptWork.cs - Decrypt workflow → JSON conversion: loads metadata via
OneFileEncryptDecrypt/XWork/DecryptWork.cs - Decrypt workflow → Crypto records: checks metadata
OneFileEncryptDecrypt/XWork/DecryptWork.cs - Decrypt workflow → Decrypt processing: dispatches mode
OneFileEncryptDecrypt/XWork/DecryptWork.cs - Encrypt processing → File operations: reads and packages
OneFileEncryptDecrypt/XWork/EncryptWork_AES256.cs - Encrypt processing → Key derivation: derives keys
OneFileEncryptDecrypt/XWork/EncryptWork_AES256.cs - Encrypt processing → Hash and HMAC: computes HMAC
OneFileEncryptDecrypt/XWork/EncryptWork_AES256.cs - Encrypt processing → JSON conversion: writes metadata
OneFileEncryptDecrypt/XWork/EncryptWork_AES256.cs - Encrypt processing → Work file paths: uses work paths
OneFileEncryptDecrypt/XWork/EncryptWork_AES256.cs - Decrypt processing → Key derivation: derives keys
OneFileEncryptDecrypt/XWork/DecryptWork_AES256.cs - Decrypt processing → Hash and HMAC: checks integrity
OneFileEncryptDecrypt/XWork/DecryptWork_AES256.cs - Decrypt processing → File operations: reads and writes
OneFileEncryptDecrypt/XWork/DecryptWork_AES256.cs - Decrypt processing → Work file paths: uses work paths
OneFileEncryptDecrypt/XWork/DecryptWork_AES256.cs - Decrypt processing → Crypto records: reads metadata
OneFileEncryptDecrypt/XWork/DecryptWork_AES256.cs - Key derivation → Crypto work order: uses password order
OneFileEncryptDecrypt/XCrypto/CryptoKeySet.cs - File operations → Progress tracking: updates progress
OneFileEncryptDecrypt/XWork/FileWork.cs - AES CBC → Progress tracking: updates progress
OneFileEncryptDecrypt/XCrypto/AES256CBC.cs - AES GCM → Progress tracking: updates progress
OneFileEncryptDecrypt/XCrypto/AES256GCM.cs - Hash and HMAC → Progress tracking: updates progress
OneFileEncryptDecrypt/XCrypto/HashWork.cs - Console output → Localized messages: formats messages