Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi!
I worked on your code and I have just implemented a new functionality: now the user can choose to encrypt also the files names and related directories. To do that it adds a new json file called "metadata" where old names are stored. During the decryption it automatically searchs for the metadata file: if found, it restores the names, if not it decrypts without doing it.
If you want to encrypt a single file, the metadata file will be in the same directory of the file. Whereas, if you want to encrypt a directory, it stores the metadata file in the directory you want to encrypt.
The encryption is done by using crypto module, making the sha256 of the file/dir name with a random generated salt.
I found it more convinient than doing a "real encryption" of a string. Obviously the metadatafile is encrypted so the strength of the code is related of the robustness of the password (maybe I will implement a way to suggest real robust password according owasp guide lines)
I didn't add any log of this functionality yet.