Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sha256 names functionality #13

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

williamzeni99
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant