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

Rewrite code for better readability and performance #20

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

smunteanu6
Copy link

@smunteanu6 smunteanu6 commented Dec 24, 2022

In the JS files: precomputed salt and iv bytes, changed hexStringToBytes to something performs faster and is easier to read, removed unnecessary comments, and instead used self-explanatory variable names, replaced all quotes with either '' or ``, added ; at the end of each line.
In the CSS and HTML: used fewer lines of code, to have a better view for the JS code, since that is the main focus of bounty.html.

In the JS files: recomputed salt and iv bytes, changed hexStringToBytes to something performs faster and is easier to read, removed unnecessary comments, and instead used self-explanatory variable names, replaced all quotes with either '' or ``, added ; at the end of each line.
In the CSS and HTML: used fewer lines of code, to have a better view for the JS code, since that is the main focus of bounty.html.
Turned `decrypt()` into 2 functions, `decrypt()` which simply decrypts the cipher with the given password, salt, iv, and `decrypt_dom()` which runs when the user clicks on the decrypt button.
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.

None yet

2 participants