Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

Commit

Permalink
Add basic formatting for the salt page.
Browse files Browse the repository at this point in the history
  • Loading branch information
gaffneyc committed Jan 30, 2012
1 parent a773949 commit 6b2e513
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mkpasswd.rb
Expand Up @@ -25,7 +25,7 @@ class Mkpasswd < Sinatra::Base
end end


post "/" do post "/" do
password = params[:password] salt = params[:password].crypt("$6$#{SaltGenerator.generate}$")
password.crypt("$6$#{SaltGenerator.generate}$") erb :salt, :locals => { :salt => salt }
end end
end end
13 changes: 13 additions & 0 deletions views/salt.erb
@@ -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.