Permalink
Browse files

Add basic formatting for the salt page.

  • Loading branch information...
1 parent a773949 commit 6b2e513eb7b440611bc067b73d2bff00a1ce3107 @gaffneyc committed Jan 30, 2012
Showing with 15 additions and 2 deletions.
  1. +2 −2 mkpasswd.rb
  2. +13 −0 views/salt.erb
View
@@ -25,7 +25,7 @@ class Mkpasswd < Sinatra::Base
end
post "/" do
- password = params[:password]
- password.crypt("$6$#{SaltGenerator.generate}$")
+ salt = params[:password].crypt("$6$#{SaltGenerator.generate}$")
+ erb :salt, :locals => { :salt => salt }
end
end
View
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Mkpasswd</title>
+ <link rel="stylesheet" href="./stylesheets/mkpassword.css">
+ </head>
+ <body>
+ <a href="https://github.com/gaffneyc/mkpasswd-heroku">
+ <img style="position: absolute; top: 0; right: 0; border: 0;" src="https://a248.e.akamai.net/assets.github.com/img/4c7dc970b89fd04b81c8e221ba88ff99a06c6b61/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f77686974655f6666666666662e706e67" alt="Fork me on GitHub">
+ </a>
+ <div id="salt"><%= salt %></div>
+ </body>
+</html>

0 comments on commit 6b2e513

Please sign in to comment.