DevToys-app / DevToys

A Swiss Army knife for developers.
https://devtoys.app/
MIT License
25.55k stars 1.35k forks source link

Add Argon2 hashes #179

Open Andret2344 opened 2 years ago

Andret2344 commented 2 years ago

Vote on this issue by adding a 👍 reaction. If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)

Is your feature request related to a problem? Please describe. I miss possibility to use argon2 hashers.

Describe the solution you'd like I'd love to be able to hash a string using argon2i/argon2d/argon2id.

Describe alternatives you've considered Use the https://argon2.online/

Additional context It should be separate option, as this hash needs salt, parallelism factor, memory cost, iterations and hash length

david-ruitter commented 2 years ago

I'd like to work on that. I already implemented a simple version for Argon2i Hashes image Just let me know what you think could be enhanced or if you are happy with the layout 👍

Andret2344 commented 2 years ago

@david-ruitter Wow, I'm so glad you want to work on that!

I would have a few suggestions to your design, but foremost I want to say it's excellent, and I can't wait to see it in work. What I want to suggest is:

I'm also wondering if every row of the configuration must take the whole width, a lot of space is wasted. However, the description can be quite long and shorter field can look far worst. It's simply to consider.

But as I said, I'm so happy you are going to implement it. Kudos from me!

david-ruitter commented 2 years ago

@Andret2344 Thanks for the nice feedback! I'm going to start working on the points you stated here 👍 As for the design i took inspiration of how other tools look like, maybe @veler could also add his opinion on this. Best Regards

veler commented 2 years ago

Hi, Thank you for suggesting this idea and thank you @david-ruitter for starting an early implementation! I should admit I'm not familiar with Argon2 at all. I'm discovering it while reading this ticket. :)

I'm not opposed to the addition of such a tool but would like to make sure I understand a few things:

Regarding the UI, I like it overall. Of course, we will need to figure out a good icon for it but that's something we can figure out later.

I second what @Andret2344 mentioned. In short, having the exact same set of features than https://argon2.online/ may be the right thing to do, unless you have arguments against that (I don't know, perhaps these extra features aren't that useful?).

For generating a salt automatically, we may need to add a button next to Paste. The current Paste button, TextBox and Header are all part of a same control CustomTextBox. We will need to edit this control to add the button for generating the salt.

Since this extra button isn't common to other tools, I'd suggest making the button customizable through some new properties in the control that would allow to:

This way, when consuming the control in the tool's UI, we would have to set the button text and a command to be able to run something when the user clicks on it. What do you think of this approach?

Alternatively, we could simply put a button outside of the CustomTextBox control, either above or to the right of it.

Andret2344 commented 2 years ago

Thanks, @veler for taking part in discussion ;)

To answer your doubts:

In addition, @david-ruitter, when you are ready with all the functionality, ping me, I can translate to Polish :D

BR

EDIT: HERE is the Medium article with explanation why Argon2 is the best choice (expecially Argon2id)

veler commented 2 years ago

Gotcha, thank you for all these explanations. :) @david-ruitter, feel free to keep working on it at your rythme.

sschneider-ihre-pvs commented 10 months ago

node -e "require('argon2').hash('12345').then(data => console.log(data));" the poor man's argon example hash :D