Creating a password generator
![Cover Image for Creating a password generator](/_next/image?url=https%3A%2F%2Fcdn.sanity.io%2Fimages%2F0wurvw2o%2Fproduction%2F7c8f73e8b92b685c3dd804412c36e44e3d2ba509-2080x1092.webp%3Frect%3D130%2C0%2C1820%2C1092%26w%3D2000%26h%3D1200%26fit%3Dmax%26auto%3Dformat&w=3840&q=75)
The quest for a useful password generator
I had a problem. I wanted to make my passwords in my native language finnish. This meant coming up with words and phrases every time I wanted a memorable and secure password. That was way too tedious for way too long, so I wanted to come up with a way to make finnish passwords automatically, no thinking needed.
Looking elsewhere
I went on a quest to look for a solution, which as it turned out, did not exist. So, I decided to build it myself.
This website is definitely not finished yet. I’m planning on making it a browser extension, and in the near future I need to fix some functionality problems in it. Also, I’ll make it into a PWA by making it offline usable. (Update: It is now! Thanks to Vite-PWA).
What does it do?
Screenshot of the password generator web-app.
As of now, it (Salasanakone) generates a password. Mainly, it generates either a random string of characters and numbers, or a random string of finnish words. That can be further enforced by adding special characters to the final password.
All of the randomness is being made with the Web Crypto Api, and the frontend is built with with React using Vite.
4.4.2023 status of the site.
In the above image you can see the strength indicator paired with some additional time-to-crack info in the popover.
Built using Radix UI
This project benefitted heavily from shadcn's UI components that are built with Radix Primitives of course. The components are a delight to work with, since they're built with great thought put in to them.
What to learn from this
I am not sure if generating passwords this way is secure or wise. But I’m willing to bet that this is secure enough for most things I will be using it for.
It is a WIP and a lot of things are yet to be implemented. At this stage it covers most of my password needs though. Progress is to be made!
Check it out here: Salasanakone
Updates
4.4.2023 - UI reworking and passphrase support
- Thanks to some great critisism, I added passphrases to the site. Now anyone can actually remember these passwords.
- Updated the old zxcvbn library to the newer, more actively maintained zxcvbn-ts. This helped quite a lot in measuring the strength, since it provides a Finnish dictionary, and also additional performance improvements.
- Speed Index is back to 2,4s, since I've added more functionality, but it actually loads to interactive faster!
20.3.2023 - PWA and some added functionality
- It's now a PWA! Try it out, and add to your mobile devices home screen.
- Added numbers in the password, since most sites require numbers too in their passwords. Makes it quite a lot harder to read, but worth the trouble IMO.
- Performance increases! Less blocking scripts, more loaders. On mobile, I got PageSpeed Insights speed index down to 1,8s - 2,0s from nearly 4 seconds.
Still need to
Get special characters to the random password string. Now it only has characters and numbers.✅- Enable a service worker update interval, to prompt users to update.
- If I start to need some added functionality, like automatic password-field filling, I'll make it into an browser extension.