salted_login_generator 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/USAGE +1 -1
  2. data/templates/user.rb +2 -2
  3. data/templates/users.yml +6 -6
  4. metadata +1 -1
data/USAGE CHANGED
@@ -10,7 +10,7 @@ DESCRIPTION
10
10
  This generator creates a general purpose login system.
11
11
 
12
12
  Included:
13
- - a User model which uses MD5 encryption and salted hashes for passwords
13
+ - a User model which uses SHA1 encryption and salted hashes for passwords
14
14
  - a Controller with signup, login, welcome and logoff actions
15
15
  - a Notifier that integrates with the controller to prevent script based
16
16
  account creation (i.e., requires account verification from the registered
data/templates/user.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'digest/md5'
1
+ require 'digest/sha1'
2
2
 
3
3
  # this model expects a certain database layout and its based on the name/login pattern.
4
4
  class User < ActiveRecord::Base
@@ -29,7 +29,7 @@ class User < ActiveRecord::Base
29
29
  protected
30
30
 
31
31
  def self.hashed(str)
32
- return Digest::MD5.hexdigest("change-me--#{str}--")[0..31]
32
+ return Digest::SHA1.hexdigest("change-me--#{str}--")[0..31]
33
33
  end
34
34
 
35
35
  before_create :generate_uuid, :crypt_password
data/templates/users.yml CHANGED
@@ -3,23 +3,23 @@
3
3
  bob:
4
4
  id: 1000001
5
5
  login: bob
6
- password: 914a1dc3b25d0e37548826941aa9876a # atest
7
- salt: 6b03707e55eb8fbecb69b04a28539180
6
+ password: 1b6f8b503fd286be77c0a71694a4a08c # atest
7
+ salt: 1f5e4e58bad3d251706290e36eaca35f
8
8
  email: bob@test.com
9
9
  verified: 1
10
10
 
11
11
  existingbob:
12
12
  id: 1000002
13
13
  login: existingbob
14
- password: 900a99c96ebddd41dc15c87169de1f65 # atest
15
- salt: e77e00345e8a9e26c77fb9c1f2e690e7
14
+ password: 8338805a43c01ea358e742842c1d261d # atest
15
+ salt: e5d4e5959b88990bed360b91c1495347
16
16
  email: existingbob@test.com
17
17
  verified: 1
18
18
 
19
19
  longbob:
20
20
  id: 1000003
21
21
  login: longbob
22
- password: bc9ce7077ba7e7e5f5e2ca3efd1e7690 # alongtest
23
- salt: 5e6f3f50b1232072d1bdad4b49b4cf1f
22
+ password: 909347c8133bc94fa452579f36707cb4 # alongtest
23
+ salt: e422fbcffe00b2cde7ef6582fdb3b674
24
24
  email: longbob@test.com
25
25
  verified: 1
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.8.8
3
3
  specification_version: 1
4
4
  name: salted_login_generator
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.1
6
+ version: 1.0.2
7
7
  date: 2005-04-05
8
8
  summary: "[Rails] Login generator with salted passwords."
9
9
  require_paths: