I made a simple Bcrypt hash generator website with Golang

Screenshot of bcrypt.fun website

Sometimes when I am working with dummy database I might need to change the password of a generated user. The easiest way to do this is to got to google for a bcrypt generator and then paste the generated hash into the database in order to update the password. This is much quicker than having to write a function to do this for me or to create a new user from scratch. It is also useful if I need to reset a password to an account which I have totally lost access to. Turns out I don’t like many of the bcrypt generators that are out there and the domain bcrypt.fun was available so I figured, why not make my own generator since I already created password.fun.

So in one afternoon I sat down, copied most of the code I had used for password.fun and created this new website. The website uses the Revel framework which feels overkill for a small website like this. I also have no frontend design skills. I just went with the old standard bootstrap layout which looks alright. Now that the site is done you are able to paste in one or more strings (one per line) which will turn into a bcrypt hash when you hit generate. That’s all that it really does, so simple. It does have an API which is technically open to anyone to use but I skipped the documentation and FAQ sections for this project as it was probably overkill for the password generator anyways. There is also no mailchimp sign up form, why did I even add that to the password site?

Deploying Bcrypt.fun

Once again I would like to mention that this is all hosted with Caddy. Caddy makes the setup super simple compared to Nginx or Apache that I used to use in the past. The configuration is literally 4 lines which includes the SSL configuration, see below:

www.bcrypt.fun, bcrypt.fun {
    tls markus@tenghamn.com
    proxy / localhost:8005

As always, you can find the entire source code for Bcrypt.fun on Github.

Author: Markus

I have been building websites and apps since I was 13. At 18 I was running my own web hosting company. I love writing, it is one of my favorite hobbies which lets me share things I find interesting with others. Don't forget to follow me on Twitter.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.