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

Add a Password Generator #22

Closed
umitseyhan75 opened this issue Aug 2, 2021 · 22 comments
Closed

Add a Password Generator #22

umitseyhan75 opened this issue Aug 2, 2021 · 22 comments
Assignees
Labels
enhancement New feature or request

Comments

@umitseyhan75
Copy link
Contributor

A button right side of password entered area named "generate" would be pretty usefull.
Ideally I would suggest implement Bitwarden's generator.
And some optional checkboxes like "copy the generated password to the clipboard" or "remove the password from the clipboard after x time passed" or "save the generated password to a text file where the encrypted files will be located".

@HACKERALERT
Copy link
Owner

@umitseyhan75 Of course, I can do that! I'll put that on the list of to-dos for v1.15, which also includes localization support. v1.14 is almost finished and once released, I'll get started on localization and a password generator. Thanks for the request!

@HACKERALERT HACKERALERT self-assigned this Aug 2, 2021
@HACKERALERT HACKERALERT added enhancement New feature or request in progress Work is in progress labels Aug 2, 2021
@HACKERALERT
Copy link
Owner

@umitseyhan75 The password generator has been implemented in v1.15. Can you give it a try and let me know your thoughts? Thanks!

@umitseyhan75
Copy link
Contributor Author

umitseyhan75 commented Aug 10, 2021

It works and functions simple. If you belive this way matches with Picocrypt's simplicity ideology, I am okay with that.
But, as can be seen from the fact that I have given bitwarden as an example before, I prefer some options to exist.
Like; capitalitions on-off switch, password legth, password-passphare switch, numbers, special characters or minimum amount of them. These are can be considered as todays standart and almost all password managers have it. Here I am adding a picture for reference.
resim

@HACKERALERT
Copy link
Owner

Hi @umitseyhan75, not a problem at all, I can do that! I'll just make the "Generate" button open a modal and there, you can tick checkboxes to toggle lowercase letters, symbols, etc. I'll post a screenshot when I have it ready :)

@umitseyhan75
Copy link
Contributor Author

Also, I suggest you to find an eye icon svg (with matcihng colours of ui) and put it at the far right end of password box as a button to funciton as "show/hide" password.

@HACKERALERT
Copy link
Owner

@umitseyhan75 Try out the file attached and let me know what you think of the password generator. Thank you!
Picocrypt.zip

@umitseyhan75
Copy link
Contributor Author

umitseyhan75 commented Aug 10, 2021

@umitseyhan75 Try out the file attached and let me know what you think of the password generator. Thank you!
Picocrypt.zip

I do not see any diffrence. Are you sure this not the same file? I mean normal 1.15.

@HACKERALERT
Copy link
Owner

Hmm? My bad! Here's the correct one. (Don't worry about the big file size, this is just a test version)
Picocrypt.zip

@umitseyhan75
Copy link
Contributor Author

Yeap, that is better! But still needs improvement. Especially password length.

@HACKERALERT
Copy link
Owner

Great to hear! Can you list all the improvements you would like to see so that I have a guideline?

@umitseyhan75
Copy link
Contributor Author

umitseyhan75 commented Aug 10, 2021

Okay, here are the first things that comes to my mind.

Cosmetic

  1. The pop-up box when we click generate, it's corners needs to be rounded, way too sharp right now.
  2. The background whiteness when we click generate, it feels like Picocrypt freezed. Also can't say it is visually appealing. It can be changed with black like its a shadow effect. There are lots of software has this kind of pop ups but I'll show from Bitwarden because I already have it. Here a reference.
    Q37fWQZNJW
  3. The pop-up box when we click generate, needs to have a entrance animation. You can see Bitwarden has it as a drop down animation comes from top. My suggestion here is Expand animation but a lil' bit faster.
  4. The checkboxes in the pop-up and cancel and generate buttons are need to be centered, they are all at the left right now.

Functional

  1. Also, I suggest you to find an eye icon svg (with matcihng colours of ui) and put it at the far right end of password box as a button to funciton as "show/hide" password.

Here I prepared some: eye-icon.zip

  1. These options needs to be presented:
  • Password Lenghts Selector (Pending)
  • Uppercase Letters Switch (✓)
  • Lowercase Letters Switch (✓)
  • Numbers Switch (✓)
  • Symbols Switch (✓)
  • And some other options for them with those dropdown menus, here is a paint example:
    Adsız
  1. And some optional checkboxes like "copy the generated password to the clipboard" or "remove the password from the clipboard after x time passed" or "save the generated password to a text file where the encrypted files will be located".

@HACKERALERT
Copy link
Owner

For the Cosmetics section, it would be quite difficult to implement your suggestions, because Picocrypt' UI library, giu, is rather minimal. Go is a very new language itself, and it's primarily used for servers, so frontend development is an even newer topic, which is why there doesn't exist a very good UI library for Go right now. For 1, 2, and 3, there's unfortunately nothing I can do. They're great points, but I don't think it's possible to do with giu. For 4, I'll fix it right away. The copy I sent you was right after implementing the generator, and I didn't adjust the layout yet.

For the show password button, I would be happy to do it, but again, it seems that there is no native SVG support in Go, and no support either in giu. The best I can do is use a PNG, but I'm not sure if it would scale properly. I'll need to look into this more and hopefully I will be able to do this.

The password length selector is trivial to do, so I will get to that right away. The Minimum/Exactly dropdown is a interesting idea, but why would you need varying lengths? For example, if you set a minimum of 5 characters and a 7 character password is generator, you could just set it to generate exactly 7 digits. Is there a special use case for this that I don't know about?

For your last point, no problem. I'll add the option to copy to clipboard automatically and saving the password to a text file should be simple as well. But I don't think it's possible to set the system to auto clear the clipboard after some time interval without a constant process running in the background.

I'll get to work right away!

@HACKERALERT
Copy link
Owner

BTW, I've started on a new homepage which will be https://evansu.cc/picocrypt. Right now, there's nothing, but I do have a preview of what I have so far: https://picocrypt.netlify.app/. I only spent like 20 mins on it as of now, so it doesn't have much. But it would be nice to have some feedback on what I have so far. So, what do you think of it so far?

@umitseyhan75
Copy link
Contributor Author

umitseyhan75 commented Aug 10, 2021

They're great points, but I don't think it's possible to do with giu.

That is sad to be honest.

I'm not sure if it would scale properly

You can export it at any size you want to PNG.

For example, if you set a minimum of 5 characters and a 7 character password is generator, you could just set it to generate exactly 7 digits. Is there a special use case for this that I don't know about?

I do not understand your example very much. You mean the generator you implemented supports 7 character for minimum amount?

But I don't think it's possible to set the system to auto clear the clipboard after some time interval

That is unfortune.

BTW, I've started on a new homepage which will be https://evansu.cc/picocrypt. Right now, there's nothing, but I do have a preview of what I have so far: https://picocrypt.netlify.app/. I only spent like 20 mins on it as of now, so it doesn't have much. But it would be nice to have some feedback on what I have so far. So, what do you think of it so far?

I do belive Picocrypt needs a web site. But I do not think this issue is not the place to talk about it.

@HACKERALERT
Copy link
Owner

You can export at any size you want to PNG.

I think it might be possible to detect screen DPI, and rasterize the SVG to a PNG using the DPI to get a full-res image. I'll need to take a good look to see if this is possible.

I do not understand your example very much. You mean the generator you implemented supports 7 character for minimum amount?

So for the dropdown, there's using Minimum and Exactly. If I put 4 and choose Exactly, that would generate exactly 4 digits every time. If I put Minimum, is it supposed to randomly generate 5 or 6 or more? I'm a little confused about this.

I do belive Picocrypt needs a web site. But I do not think this issue is not the place to talk about it.

Cool, I won't bring this topic "off-topic" :P

Here's what the generate password modal looks like right now:
Screenshot (151)

@umitseyhan75
Copy link
Contributor Author

umitseyhan75 commented Aug 10, 2021

Now that I've thought about it again and the lowercase may need to removed from there. The Minimum and Exactly selections for numbers, symbols and uppercases. Those numbers on paint reference are just random numbers for showing purpose. Let's say I selected password lenght to 20 and "Exactly" option and put 2 to the symbols and all others are 1 (can not be zero on Exactly anyway). In this case the password will have exactly 2 symbols, 1 digit and 1 uppercase nothing more nothing less. all other should be lowercase letters. Besides those amounts can't be more than total lenght.

@HACKERALERT
Copy link
Owner

Oh, I see what you mean, and I totally see why that would be useful. Although since Picocrypt is meant to be relatively simple, a scenario like that would be a bit overkill. I think the current setup, where you choose a length and toggle the sets of characters you would like, is the best fit. Simple enough not to confuse a user (I was a little confused until you described it), but customizable enough to choose a secure password. So in line with Picocrypt's ideology, I don't think it's necessary to go this far. Although I do thank you very much for suggesting togglable sets of characters.

@umitseyhan75
Copy link
Contributor Author

Well then, that is something after all!

@umitseyhan75
Copy link
Contributor Author

umitseyhan75 commented Aug 11, 2021

I don't know if it is possible or not but, the password lenght section can be color filled (light blue) depending on the lenght.
Let's say I put that blue little indicator to 20 than left side of it will be filled. Something like a loading bar like windows copying box.
Some examples of what I am thinking for reference or use: 1 2 3

@umitseyhan75
Copy link
Contributor Author

Btw that is exactly what I had in my mind for the eye icon. Reference: Send
Adsız

@HACKERALERT
Copy link
Owner

Your first point about the solid slider isn't possible as far as I know, but the second might be possible. I won't dive deep into it right now, as I have many other things to get to, but it might be something I'll add in v1.17 or later.

@HACKERALERT
Copy link
Owner

The password generator is complete, and since it has some customizability and aligns with Picocrypt's ideology, I think I won't be changing it in the future. So I'll be closing this issue.

@HACKERALERT HACKERALERT removed the in progress Work is in progress label Sep 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants