• Custom User Avatar

    Thanks for your feedback, I updated the description.

  • Custom User Avatar

    Thanks for your feedback, I updated the description.

  • Custom User Avatar

    Not if you want to be able to retrieve it easily.

    The goal here is to have mnemotechnic ideas for passwords, not to generate ones impossible to remember with complex hash functions and salt.
    Your method would be interisting server side which was not the goal here.

    But thanks.

  • Custom User Avatar

    I know it's just a kata, but something like this would make a much better password generator for use in the real world:

    def pwgen(base, sitename, length=12)
      salt = "0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33" # must be kept secret
      Digest::SHA1.base64digest(base+sitename+salt)[1..length]
    end
    
    pwgen('secret', 'codewars') #=> "X+zJ2Kz2E6DY"
    pwgen('secret', 'facebook') #=> "6IH/OuqJrHl+"
    
  • Custom User Avatar

    Strange. I opened the page again and resubmitted without changes, and this time it worked! I hadn't seen any error messages...

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution