11<div id =" top " align =" center " >
2- <h1 >qt-cli_file_encryption- decryption</h1 >
2+ <h1 >file encryption/ decryption</h1 >
33
4- <h4 >File encryption and decryption, shell/commandline</h4 >
4+ <h4 >File encryption and decryption ( shell/commandline) </h4 >
55<h6 >for Linux, MacOS, Windows</h6 >
66
77[ Report Issue] ( https://github.com/Zheng-Bote/qt-cli_file_encryption-decryption/issues ) [ Request Feature] ( https://github.com/Zheng-Bote/qt-cli_file_encryption-decryption/pulls )
@@ -55,11 +55,20 @@ Qt6 C++23 shell/commandline application to encrypt / decrypt the given file.
5555- Password: SHA256, between 5 to 32 characters
5656- initialization vector: MD5
5757
58- See folder ` docs/img ` for screenshots.
59-
6058## Features
6159
60+ - [x] encrypt/decrypt every readable file (binary-mode, chunk size 4MB)
6261- [ ] i18n
62+
63+ - [x] runs on DOS/Windows (shell/commandline)
64+ - [x] runs on MacOS (cli)
65+ - [x] runs on Linux (cli)
66+ - [ ] runs on iOS
67+ - [ ] runs on Android
68+ - [ ] runs on HarmonyOS
69+ - [ ] supports pipe operator or arguments
70+ - [x] supports arguments and dotenv file
71+
6372- [x] OSS and license
6473- [x] works as designed
6574- [ ] no bugs
@@ -70,15 +79,6 @@ See folder `docs/img` for screenshots.
7079- [x] Installation routine (no Adminstrator rights needed)
7180- [ ] portable application
7281
73- - [x] runs on DOS/Windows
74- - [x] runs on MacOS
75- - [x] runs on Linux
76- - [ ] runs on iOS
77- - [ ] runs on Android
78- - [ ] runs on HarmonyOS
79-
80- - [x] supports pipe operator or arguments
81-
8282<p align =" right " >(<a href =" #top " >back to top</a >)</p >
8383
8484# Status
@@ -94,9 +94,55 @@ See folder `docs/img` for screenshots.
9494
9595# Documentation
9696
97+ ## Usage
98+
99+ ``` cli
100+ file_encryption-decryption-x86_64 -h
101+
102+ cli app to encrypt and decrypt a given file
103+ Usage:
104+ qt-cli_file_encryption-decryption [OPTION...]
105+
106+ -s, --source arg <path/to/sourcefile> to en-/de-crypt. Mandatory: -s | -d
107+ -t, --target arg target <path/to/outputfile>. Optional: -t | -d
108+ -p, --pwd arg name of password env variable. Mandatory: -p | -d
109+ -d, --dotenv arg <path/to/dotenv> file. Mandatory: -s | -p | -d
110+ -h, --help Print help
111+ ```
112+
113+ ### Rules
114+
115+ - if sourcefile given without a targetfile and sourcefile has not extension ` .aes ` , the targetfile will be encrypted as ` <samePath>/<sourcefile>.aes `
116+ - if sourcefile has extension ` .aes ` without a targetfile, the targetfile will be decrypted ` <samePath>/<sourcefile> ` (without extension ` .aes ` )
117+
118+ ``` mermaid
119+ flowchart TD;
120+ A[<pathto/sourcefile>.aes]-. is_encrypted .->B[[encrypt sourcefile]]
121+ B-- has_targetfile -->C[[<new/pathto/sourcefile>.aes]]
122+ B-- no_targetfile -->C[[<pathto/sourcefile>.aes]]
123+
124+ A[<pathto/sourcefile>]-. not_encrypted .->B[[decrypt sourcefile]]
125+ B-- has_targetfile -->C[[<new/pathto/sourcefile>]]
126+ B-- no_targetfile -->C[[<pathto/sourcefile>]]
127+ ```
128+
97129## Encryption
98130
99- _ under construction_
131+ ### Linux
132+
133+ ``` cli
134+ ./file_encryption-decryption-x86_64.AppImage --source /path/to/sourcefile.xlsx
135+
136+ cli app to encrypt and decrypt a given file
137+ Usage:
138+ qt-cli_file_encryption-decryption [OPTION...]
139+
140+ -s, --source arg <path/to/sourcefile> to en-/de-crypt. Mandatory: -s | -d
141+ -t, --target arg target <path/to/outputfile>. Optional: -t | -d
142+ -p, --pwd arg name of password env variable. Mandatory: -p | -d
143+ -d, --dotenv arg <path/to/dotenv> file. Mandatory: -s | -p | -d
144+ -h, --help Print help
145+ ```
100146
101147> \[ !WARNING]
102148> don't loose your password. Decryption/Recovery without valid password is impossible!
@@ -105,6 +151,22 @@ _under construction_
105151
106152_ under construction_
107153
154+ ## configuration: dotenv or env
155+
156+ Example dotenv file ` .env `
157+
158+ ``` dotenv
159+ SOURCE_FILE=/inpath/to/file.xlsx # Mandatory or mandatory via argument --source
160+ TARGET_FILE=/outpath/to/file.xlsx # Optional or optional via argument --target
161+ PWD=my_env_secret # Mandatory get password from $my_env_secret or mandatory via --pwd
162+ ```
163+
164+ Example pwd environmwent variable
165+
166+ ``` cli
167+ export PWD="top_secret_password"
168+ ```
169+
108170## Test / Performance
109171
110172** tested on**
@@ -177,9 +239,16 @@ The Qt framework contains a comprehensive set of highly intuitive and modularize
177239
178240Small and portable AES encryption class for Qt. Native support for all key sizes - 128/192/256 bits - ECB, CBC, CFB and OFB modes for all key sizes partial AES-NI support
179241
180- [ ![ Matt Bricke] ( https://img.shields.io/badge/Github-bricke -black?logo=github )] ( https://github.com/bricke/Qt-AES )
242+ [ ![ Matt Bricke] ( https://img.shields.io/badge/Github-Matt_Bricke -black?logo=github )] ( https://github.com/bricke/Qt-AES )
181243[ ![ UNLICENSE] ( https://img.shields.io/badge/License-Unlicense-green.svg )] ( https://github.com/bricke/Qt-AES?tab=Unlicense-1-ov-file )
182244
245+ ### dotenv-cpp
246+
247+ An utility to load environment variables from a .env file
248+
249+ [ ![ Heikki Johannes Hildén] ( https://img.shields.io/badge/Github-Heikki_Johannes_Hildén-black?logo=github )] ( https://github.com/laserpants )
250+ [ ![ BSD-3] ( https://img.shields.io/badge/License-BSD_3-green.svg )] ( https://choosealicense.com/licenses/bsd-3-clause )
251+
183252<p align =" right " >(<a href =" #top " >back to top</a >)</p >
184253
185254## folder structure
@@ -242,7 +311,7 @@ Small and portable AES encryption class for Qt. Native support for all key sizes
242311
243312[ ![ MIT License] ( https://img.shields.io/badge/License-MIT-green.svg )] ( https://choosealicense.com/licenses/mit/ )
244313
245- Copyright (c) 2024 ZHENG Robert
314+ Copyright (c) 2025 ZHENG Robert
246315
247316Permission is hereby granted, free of charge, to any person obtaining a copy
248317of this software and associated documentation files (the "Software"), to deal
0 commit comments