Comments (3)
Hi,
It's a design decision and it's yours :) I guess any file that only has a few bytes will be enlarged to at least 16 KiB with -f|--obfuscate
so it doesn't matter if it does it for 0-byte files as well. I wouldn't want to get notifications on the command line when something like this happens, at least it would be nice if this could be suppressed. Take your time to fix this and have a nice holiday!
from kryptor.
Hi @highend,
Many thanks for the report. It unfortunately looks like I never tested encrypting/decrypting 0 byte files properly.
I just tried encrypting and decrypting an empty text file, and it did decrypt to a 0 byte file, but I also got that error message, and the .kryptor
file was not deleted because of the exception. I can already see the problematic line in the code. The program tries to set the length of the file to less than 0 because there's no padding to remove.
If you use -f|--obfuscate
, then there's no error message because there's a chunk after the headers. However, I should warn you that doing this will cause the 0 byte files to increase in size to 16 KiB once encrypted because Kryptor is designed to hide the exact length of the file. I have mixed feelings about whether that's the right approach to take since it increases storage requirements and other programs don't do that. Please let me know what you think. It would require a breaking change to tweak though.
Anyway, I'll get this fixed for the next release. I'm afraid I'm going on holiday, so it'll take some time. There are also a few other minor things I'd like to add for v3.0.4 that I haven't managed to do yet because I've been working on some other projects.
from kryptor.
Thanks! I think that's best for now at least. I'll perhaps remove the chunking for small files in v4. We'll see.
from kryptor.
Related Issues (20)
- File/Folder encrypting problem HOT 3
- 📋 Feature: Speed up reading original file name for large files HOT 1
- 🐛 Bug: System.OverflowException converting the FileStream length to an int HOT 2
- 📋 Feature: File names and tree structure HOT 4
- 🐛 Bug: Cannot decrypt folder with anonymous rename disabled HOT 2
- 💻 Support: Incorrect password HOT 6
- ✨ Feedback: 3.0b HOT 8
- ❓ Question: Is it possible to enter the password before ? HOT 1
- ✨ Feedback: Better UX: Error: This file/folder doesn't exist. HOT 3
- Error: IOException - Unable to retrieve private key. HOT 6
- 💻 Technical Support: Can't run Kryptor on Windows 10 HOT 2
- 🐛 Bug: Incorrect decrypted file name for duplicated files when in the same location. HOT 1
- 📝 Documentation: Wrong .NET version? HOT 2
- 🐛 Bug: Space in folder name causes error HOT 1
- 🐛 Bug: Files with a certain length get truncated during decryption HOT 1
- 🐛 Bug: Interactively created passphrase does not work. HOT 3
- Corruption Verification
- 🐛Bug: cannot execute pre-built Linux binary; exec: Failed to execute process HOT 3
- 🐛Bug: Cannot run Kryptor binary on NixOS HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kryptor.