🇫🇷 Vous parlez français ? Ouvrez LISEZMOI.md en français
GoFileEncoder is a little file encoder that uses the XOR encryption. It is coded in Golang, and is compiled for several OSs (Windows®, Linux®, and soon macOS®).
I am not a pro in Go, so if you find a bug, or simply want to make a suggestion, I am totally open to issues, pull requests_ and to the discussion.
git clone https://github.com/eliotttak/GoFileEncoder
cd GoFileEncodergithub.com/eliotttak/GoFileEncoder (this project)
|
+-- github.com/sqweek/dialog (for the file popups)
| |
| \_ github.com/TheTitanrain/w32 (indirect)
|
+-- golang.org/x/term (for the password asking)
| |
| \_ golang.org/x/sys (indirect)
|
\_ github.com/christianhujer/isheadless (to verify if there is a GUI)
Refer to the file go.mod for more details.
🛈 In go.mod, there can be an import for github.com/abdfnx/gosh. It was used only for my setup, and you shouldn't need it. It will disappear if you run
go mod tidy.
github.com/go-bindata/go-bindata/go-bindata/...(to create the assets file)
Only for Windows®:
svg_to_ico(Ortham/svg_to_ico) must be in$PATHor%PATH%(to convert the SVG icon into the ICO format)resourcehacker(www.angusj.com/resourcehacker/#download) must be in$PATHor%PATH%(to add the icon to the executable)
go mod tidy
go install github.com/go-bindata/go-bindata/go-bindata/...
go getYou also have to install manually Resource Hacker and svg_to_ico.
# You will maybe have to run 'chmod 744 build.sh'
./build.sh # You can add GOOS and GOARCH values, e.g. './build.sh linux amd64'rem You can add GOOS and GOARCH values, e.g. 'build.bat windows amd64'
build.bat./bin/portables/GoFileEncoder_portable_linux_amd64 # You can write another OS or architecture..\bin\portables\GoFileEncoder_portable_windows_amd64.exe
rem You can write another OS or architecture.Download a translation file (e.g. translate-en-GB.json) and place it in the same folder as the executable.
The choice of the language to use is partly automated. Here are the details:
In this configuration, the language used will be British English (en-GB).
In this configuration, the translation file installed will be used.
In this configuration, each time the program is starting, the available languages will be listed, and you will be invited to choice one.
The file name must be in the format translate-ab-CD.json, e.g. translate-en-GB.json.
The file is in the JSON format.
The file is composed of five main parts:
generalcontains the translations that will be used by at least 2 differents packages.Introcontains the translations used only by the packagemain.CommonThingscontains the translations used only by the packagecommonThings.Encodingcontains the translations used only by the packageencoder.Decodingcontains the translations used only by the packagedecoder.
At first, run the program. It will ask you if you want to decode or encode a file :
Que voulez-vous faire ?
- Encoder un fichier (e)
- Décoder un fichier (d)
(e/d)>>>
If you want to encode a file, enter e, else, enter d. In all the cases, confirm with Enter.
Then, it will ask you to press Enter to select a file. Do it, and a popup will aappear. Select your file, then confirm.
🛈 If you cancel, the popup will appear back twice, then at the 3rd, the message
"Trop de tentatives échouées"(Too many failed attempts) will be displayed and the program will be closed.
🛈 If your configuration don't include graphic interface, you will have to enter manually the absolute path to your file.
After it, you will be asked for a password. Enter it then confirm by pressing Enter.
⚠ If you choosed
Decode a file, be careful to write the password correctly. If you misspell it by even one character, the file will be corrupted and no longer usable.
🛈 To ensure that your password remains confidential, it will not be displayed on your screen.
Then, the program will ask you to press Enter to choose the destination file. Do it, and a popup will aappear. Select the file to create, then confirm.
🛈 If you cancel, the popup will appear back twice, then at the 3rd, the message
"Trop de tentatives échouées"(Too many failed attempts) will be displayed and the program will be closed.
🛈 If your configuration don't include graphic interface, you will have to enter manually the absolute path to your file.
The file is being encoded. Do not close the program.
After a few seconds, the file is encoded or decoded. The programme closes automatically.
This software is distributed under the GNU GENERAL PUBLIC LICENSE version 3 (GNU GPL v3).