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

[Feat] - Hash Generator #61

Merged
merged 13 commits into from
Oct 2, 2024
Merged

Conversation

EduardoDePatta
Copy link
Contributor

@EduardoDePatta EduardoDePatta commented Sep 3, 2024

Hello!

This PR introduces a new Hash Generator tool that allows users to generate secure hashes for their text using various cryptographic algorithms directly in the browser. The tool supports popular algorithms like SHA-256, SHA-512, MD5, PBKDF2 (with SHA-512), and HMAC (with SHA-256 or SHA-512). The implementation leverages Node.js' native crypto module, ensuring a secure and efficient solution without external dependencies.

Key Changes

Utility Functions

  • Added generateHash function to handle the creation of hashes using the selected algorithm and encoding.
  • This function ensures secure hashing by using well-established algorithms from the Node.js crypto module.

New Component

  • Implemented the HashGenerator component, which provides an interactive interface for users to input text, select an algorithm, and generate hashes.
  • The component includes options for customizing the hashing process, such as specifying a salt, iterations, output length, and encoding format.

Error Handling

  • Added comprehensive error handling to manage cases where inputs are missing or invalid, improving the user experience by providing clear feedback.

Benefits

Security and Performance

  • By utilizing the Node.js crypto module, the tool ensures that hashing is performed securely and efficiently, reducing potential risks and the application's overall footprint.

Flexibility

  • The tool offers multiple algorithms and customization options, allowing users to tailor the hashing process to their specific needs.

Ease of Use

  • The user interface is straightforward, with clear fields for input and options, making it easy for developers to generate and copy hashes for their applications.

Closes: #59

@peckz
Copy link
Collaborator

peckz commented Sep 30, 2024

@EduardoDePatta Thank you!
I verified the tool, it's works quite well!

I had some design preference and pushed one commit just related to UI, also left few comments/suggestions mostly related to types.

@peckz
Copy link
Collaborator

peckz commented Oct 2, 2024

@EduardoDePatta Thank you! I'm merging this ⚡

@peckz peckz merged commit 2439547 into jamdotdev:main Oct 2, 2024
1 check passed
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.

Feat: Generate Hash
2 participants