Algorithm-Arena / weekly-challenge-10-password-generator

2 stars 0 forks source link

Submission - random password generator #2

Open maciejSzcz opened 3 months ago

maciejSzcz commented 3 months ago

Entry for : https://github.com/Algorithm-Arena/weekly-challenge-10-password-generator

Code/Source: https://github.com/maciejSzcz/password_gen

Live Example: https://password-gen-algo-arena.fly.dev/password-gen?minLength=10&userReadable=true

Video

https://github.com/Algorithm-Arena/weekly-challenge-10-password-generator/assets/24374185/6b155cfa-a606-4baa-89a4-f4b5cad4a6e5

Description

This is a password generator written in go, it's a http service which returns a randomly generated password, based on parameters passed in the request (in the format as described in the table below). It's definitely not a high quality piece of code, but I haven't written anything in go in a long time and wanted to write something creative. The most interesting part in my opinion is generating passwords which should be generally similar to actual user generated passwords, which is available under userReadable param. It probably shouldn't be a part of any password generator, as it uses leaked passwords to generate similar ones with markov chain, but it was fun to add in, so I've done it.

parameter type default
minLength number 15
maxLength number 0
minDigits number 0
minSpecialChars number 0
minLetters number 0
userReadable boolean false
allUpperCase boolean false
allLowerCase boolean false

How to try it out

Open this link and edit the parameters https://password-gen-algo-arena.fly.dev/password-gen?minLength=16&maxLength=30&minDigits=3&minSpecialChars=2&minLetters=5&userReadable=true&allUpperCase=true

vjeux commented 3 months ago

Congratz on the third place winning $25! Please reach out to me on twitter (@vjeux) or email vjeuxx@gmail.com to let me know how you'd want to receive the money.