bcrypt 3.1.11-x86-mingw32 → 3.1.12.rc1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,17 @@
1
1
  ---
2
- !binary "U0hBMQ==":
2
+ !binary "U0hBMjU2":
3
3
  metadata.gz: !binary |-
4
- M2U1Yjc3MzcyZDQ5OTU5YjA2NmRiYThjNWQ2YjI4ZmY0MmQ1Y2U5Yg==
4
+ YTE3NjQ0NTdmMTllNjExM2JiZTI1NGE4ZDE5YzBkMDAwZmZmNGNlMzQ0MmE3
5
+ MDYwMjIyM2FkMjJjZTM0ZDc2MA==
5
6
  data.tar.gz: !binary |-
6
- MTFlMDExMGY3NTEzYmY2ZDliMWNhNjY4YWE1ZGYxZTNkNTYwZjY1MQ==
7
+ MTMwMDcxOTdkYzQ0YWQ3NWI1ZTAyNWJjNGFlZDMxNzViYmM4NmYyMGFmYjA0
8
+ MGQ5NjU4NjAwZGNlNzVjNWMxMA==
7
9
  SHA512:
8
10
  metadata.gz: !binary |-
9
- YjRhMWUzNTc1MTczNTk5NmRhZDBhYjUyZDk3ZWI4N2ZmOTRhYjI4MDY4MjVl
10
- MWRjMjc5ZmQyZWFhYTI1YzFkYTJhY2E2ZThiMWRkYzU2NWUzNWM3YWIzNGYz
11
- ZDVmMGY4MWNhZGViODViNjNjYTAxNDc5NzE5ODQ3NTA2NzRkNzk=
11
+ NTNmNjZiZjdjYWY2NGE4ZWIwZjNlNDYxYzgzYjcxYzg0NWMxMDJmZGQyZjVj
12
+ NDEzMTMyMmQ0ZDI2YjhkYzM1YzJhNTA4MzgxNTgzMWVjODBhNWJiNGZmMjRi
13
+ ZTgxZGRkZGMxN2RlNGY2YTMwMWM3MDk4ODJjODc4OTJkMzk1ZWM=
12
14
  data.tar.gz: !binary |-
13
- NDg1ZDlkOTNkMWZjNzc1MDg4MTI0MjI2NGRjZDMxZTQwZTUyNTY3ZWYzNTNl
14
- MzJlOGIxN2Y0YzIwZjExYThmZDE0MmMzYTM5YmQ5NTY4MmYwMTA2Y2JkZjcw
15
- ZmFjNGNhZWVmZGQ1ZDQ5ZDFkMDY3NWVmZGVlNGYzNDFjNTk2NDU=
15
+ ZjM0NjhkNDYxYTEzYmIyZDRjYjg4NjUxOTdiYjEwNDgyMzE4NTVhMTk1NWRj
16
+ YjJkZmU2YTQ1MmM1YjkzMjg5NWIxYTkwNjZiMzdkODMxNDdiOTc4NGQwMTRj
17
+ YTFhMDU3MjBlYTVjY2FjNTQ0ZTg3MTM0NWMzMTBiY2I2NDhmZTY=
data/.travis.yml CHANGED
@@ -1,16 +1,21 @@
1
1
  language: ruby
2
+ before_install:
3
+ - gem update --system
4
+ - gem install bundler
2
5
  rvm:
3
- - 1.8.7
4
- - 1.9.2
5
- - 1.9.3
6
- - 2.0.0
7
- - 2.1.0
8
- - 2.2.0
9
- - 2.3.0
6
+ - 1.8
7
+ - 1.9
8
+ - 2.0
9
+ - 2.1
10
+ - 2.2
11
+ - 2.3
12
+ - 2.4
13
+ - 2.5
14
+ - 2.6
10
15
  - ruby-head
11
16
  - jruby-18mode
12
17
  - jruby-19mode
13
18
  - jruby-head
14
- - rbx-2
19
+ - rbx-3
15
20
  - ree
16
21
  script: bundle exec rake
data/CHANGELOG CHANGED
@@ -82,3 +82,7 @@
82
82
 
83
83
  3.1.11 Mar 06 2016
84
84
  - Add support for Ruby 2.2 in compiled Windows binaries
85
+
86
+ 3.1.12 May 15 2018
87
+ - Add support for Ruby 2.3, 2.4, and 2.5 in compiled Windows binaries
88
+ - Fix compatibility with libxcrypt [GH #164 by @besser82]
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bcrypt (3.1.11)
4
+ bcrypt (3.1.12.rc1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  diff-lcs (1.2.5)
10
- json (1.8.3)
11
- json (1.8.3-java)
10
+ json (1.8.6)
11
+ json (1.8.6-java)
12
12
  rake (10.4.2)
13
13
  rake-compiler (0.9.5)
14
14
  rake
@@ -41,4 +41,4 @@ DEPENDENCIES
41
41
  rspec (>= 3)
42
42
 
43
43
  BUNDLED WITH
44
- 1.11.2
44
+ 1.16.1
data/README.md CHANGED
@@ -30,8 +30,8 @@ re-hash those passwords. This vulnerability only affected the JRuby gem.
30
30
  The bcrypt gem is available on the following ruby platforms:
31
31
 
32
32
  * JRuby
33
- * RubyInstaller 1.8, 1.9, 2.0, 2.1, and 2.2 builds on win32
34
- * Any 1.8, 1.9, 2.0, 2.1, 2.2, or 2.3 Ruby on a BSD/OS X/Linux system with a compiler
33
+ * RubyInstaller 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, and 2.5 builds on Windows
34
+ * Any 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, or 2.5 Ruby on a BSD/OS X/Linux system with a compiler
35
35
 
36
36
  ## How to use `bcrypt()` in your Rails application
37
37
 
@@ -40,69 +40,58 @@ The bcrypt gem is available on the following ruby platforms:
40
40
  implements a similar authentication strategy to the code below.
41
41
 
42
42
  ### The _User_ model
43
-
44
- require 'bcrypt'
45
-
46
- class User < ActiveRecord::Base
47
- # users.password_hash in the database is a :string
48
- include BCrypt
49
-
50
- def password
51
- @password ||= Password.new(password_hash)
52
- end
53
-
54
- def password=(new_password)
55
- @password = Password.create(new_password)
56
- self.password_hash = @password
57
- end
58
- end
59
-
43
+ ```ruby
44
+ require 'bcrypt'
45
+
46
+ class User < ActiveRecord::Base
47
+ # users.password_hash in the database is a :string
48
+ include BCrypt
49
+
50
+ def password
51
+ @password ||= Password.new(password_hash)
52
+ end
53
+
54
+ def password=(new_password)
55
+ @password = Password.create(new_password)
56
+ self.password_hash = @password
57
+ end
58
+ end
59
+ ```
60
60
  ### Creating an account
61
-
62
- def create
63
- @user = User.new(params[:user])
64
- @user.password = params[:password]
65
- @user.save!
66
- end
67
-
61
+ ```ruby
62
+ def create
63
+ @user = User.new(params[:user])
64
+ @user.password = params[:password]
65
+ @user.save!
66
+ end
67
+ ```
68
68
  ### Authenticating a user
69
-
70
- def login
71
- @user = User.find_by_email(params[:email])
72
- if @user.password == params[:password]
73
- give_token
74
- else
75
- redirect_to home_url
76
- end
77
- end
78
-
79
- ### If a user forgets their password?
80
-
81
- # assign them a random one and mail it to them, asking them to change it
82
- def forgot_password
83
- @user = User.find_by_email(params[:email])
84
- random_password = Array.new(10).map { (65 + rand(58)).chr }.join
85
- @user.password = random_password
86
- @user.save!
87
- Mailer.create_and_deliver_password_change(@user, random_password)
88
- end
89
-
69
+ ```ruby
70
+ def login
71
+ @user = User.find_by_email(params[:email])
72
+ if @user.password == params[:password]
73
+ give_token
74
+ else
75
+ redirect_to home_url
76
+ end
77
+ end
78
+ ```
90
79
  ## How to use bcrypt-ruby in general
80
+ ```ruby
81
+ require 'bcrypt'
91
82
 
92
- require 'bcrypt'
93
-
94
- my_password = BCrypt::Password.create("my password")
95
- #=> "$2a$10$vI8aWBnW3fID.ZQ4/zo1G.q1lRps.9cGLcZEiGDMVr5yUP1KUOYTa"
96
-
97
- my_password.version #=> "2a"
98
- my_password.cost #=> 10
99
- my_password == "my password" #=> true
100
- my_password == "not my password" #=> false
83
+ my_password = BCrypt::Password.create("my password")
84
+ #=> "$2a$10$vI8aWBnW3fID.ZQ4/zo1G.q1lRps.9cGLcZEiGDMVr5yUP1KUOYTa"
101
85
 
102
- my_password = BCrypt::Password.new("$2a$10$vI8aWBnW3fID.ZQ4/zo1G.q1lRps.9cGLcZEiGDMVr5yUP1KUOYTa")
103
- my_password == "my password" #=> true
104
- my_password == "not my password" #=> false
86
+ my_password.version #=> "2a"
87
+ my_password.cost #=> 10
88
+ my_password == "my password" #=> true
89
+ my_password == "not my password" #=> false
105
90
 
91
+ my_password = BCrypt::Password.new("$2a$10$vI8aWBnW3fID.ZQ4/zo1G.q1lRps.9cGLcZEiGDMVr5yUP1KUOYTa")
92
+ my_password == "my password" #=> true
93
+ my_password == "not my password" #=> false
94
+ ```
106
95
  Check the rdocs for more details -- BCrypt, BCrypt::Password.
107
96
 
108
97
  ## How `bcrypt()` works
@@ -171,15 +160,15 @@ stateless authentication architecture (e.g., HTTP Basic Auth), you will want to
171
160
  server load and keep your request times down. This will lower the security provided you, but there are few alternatives.
172
161
 
173
162
  To change the default cost factor used by bcrypt-ruby, use `BCrypt::Engine.cost = new_value`:
174
-
175
- BCrypt::Password.create('secret').cost
176
- #=> 10, the default provided by bcrypt-ruby
177
-
178
- # set a new default cost
179
- BCrypt::Engine.cost = 8
180
- BCrypt::Password.create('secret').cost
181
- #=> 8
182
-
163
+ ```ruby
164
+ BCrypt::Password.create('secret').cost
165
+ #=> 10, the default provided by bcrypt-ruby
166
+
167
+ # set a new default cost
168
+ BCrypt::Engine.cost = 8
169
+ BCrypt::Password.create('secret').cost
170
+ #=> 8
171
+ ```
183
172
  The default cost can be overridden as needed by passing an options hash with a different cost:
184
173
 
185
174
  BCrypt::Password.create('secret', :cost => 6).cost #=> 6
data/Rakefile CHANGED
@@ -12,6 +12,10 @@ CLEAN.include(
12
12
  "lib/1.9",
13
13
  "lib/2.0",
14
14
  "lib/2.1",
15
+ "lib/2.2",
16
+ "lib/2.3",
17
+ "lib/2.4",
18
+ "lib/2.5",
15
19
  "lib/bcrypt_ext.jar",
16
20
  "lib/bcrypt_ext.so"
17
21
  )
data/appveyor.yml ADDED
@@ -0,0 +1,50 @@
1
+ ###############################################################################
2
+ #
3
+ # This AppVeyor config is *NOT* for running the tests on Windows.
4
+ #
5
+ # This is to ensure that the latest version of the bcrypt gem can be installed
6
+ # on Windows across all of the currently supported versions of Ruby.
7
+ #
8
+ ###############################################################################
9
+
10
+ version: "{branch}-{build}"
11
+ build: off
12
+ clone_depth: 1
13
+
14
+ init:
15
+ # Install Ruby 1.8.7
16
+ - if %RUBY_VERSION%==187 (
17
+ appveyor DownloadFile https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-1.8.7-p374.exe -FileName C:\ruby_187.exe &
18
+ C:\ruby_187.exe /verysilent /dir=C:\Ruby%RUBY_VERSION%
19
+ )
20
+
21
+ environment:
22
+ matrix:
23
+ - RUBY_VERSION: "187"
24
+ - RUBY_VERSION: "193"
25
+ - RUBY_VERSION: "200"
26
+ - RUBY_VERSION: "200-x64"
27
+ - RUBY_VERSION: "21"
28
+ - RUBY_VERSION: "21-x64"
29
+ - RUBY_VERSION: "22"
30
+ - RUBY_VERSION: "22-x64"
31
+ - RUBY_VERSION: "23"
32
+ - RUBY_VERSION: "23-x64"
33
+ - RUBY_VERSION: "24"
34
+ - RUBY_VERSION: "24-x64"
35
+ - RUBY_VERSION: "25"
36
+ - RUBY_VERSION: "25-x64"
37
+
38
+ install:
39
+ - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
40
+ - if %RUBY_VERSION%==187 (
41
+ gem update --system 2.0.17
42
+ )
43
+
44
+ before_test:
45
+ - ruby -v
46
+ - gem -v
47
+
48
+ test_script:
49
+ - gem install bcrypt --prerelease --no-ri --no-rdoc
50
+ - ruby -e "require 'rubygems'; require 'bcrypt'"
data/bcrypt.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'bcrypt'
3
- s.version = '3.1.11'
3
+ s.version = '3.1.12.rc1'
4
4
 
5
5
  s.summary = "OpenBSD's bcrypt() password hashing algorithm."
6
6
  s.description = <<-EOF
data/ext/mri/bcrypt_ext.c CHANGED
@@ -45,7 +45,7 @@ static VALUE bc_crypt(VALUE self, VALUE key, VALUE setting) {
45
45
 
46
46
  if(!value) return Qnil;
47
47
 
48
- out = rb_str_new(data, size - 1);
48
+ out = rb_str_new2(value);
49
49
 
50
50
  xfree(data);
51
51
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bcrypt
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.11
4
+ version: 3.1.12.rc1
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Coda Hale
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-06 00:00:00.000000000 Z
11
+ date: 2018-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -62,9 +62,9 @@ extra_rdoc_files:
62
62
  - README.md
63
63
  - COPYING
64
64
  - CHANGELOG
65
+ - lib/bcrypt/password.rb
65
66
  - lib/bcrypt/engine.rb
66
67
  - lib/bcrypt/error.rb
67
- - lib/bcrypt/password.rb
68
68
  - lib/bcrypt.rb
69
69
  files:
70
70
  - .gitignore
@@ -76,6 +76,7 @@ files:
76
76
  - Gemfile.lock
77
77
  - README.md
78
78
  - Rakefile
79
+ - appveyor.yml
79
80
  - bcrypt.gemspec
80
81
  - ext/jruby/bcrypt_jruby/BCrypt.java
81
82
  - ext/mri/bcrypt_ext.c
@@ -91,6 +92,9 @@ files:
91
92
  - lib/2.0/bcrypt_ext.so
92
93
  - lib/2.1/bcrypt_ext.so
93
94
  - lib/2.2/bcrypt_ext.so
95
+ - lib/2.3/bcrypt_ext.so
96
+ - lib/2.4/bcrypt_ext.so
97
+ - lib/2.5/bcrypt_ext.so
94
98
  - lib/bcrypt.rb
95
99
  - lib/bcrypt/engine.rb
96
100
  - lib/bcrypt/error.rb
@@ -121,12 +125,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
121
125
  version: '0'
122
126
  required_rubygems_version: !ruby/object:Gem::Requirement
123
127
  requirements:
124
- - - ! '>='
128
+ - - ! '>'
125
129
  - !ruby/object:Gem::Version
126
- version: '0'
130
+ version: 1.3.1
127
131
  requirements: []
128
132
  rubyforge_project:
129
- rubygems_version: 2.4.3
133
+ rubygems_version: 2.7.6
130
134
  signing_key:
131
135
  specification_version: 4
132
136
  summary: OpenBSD's bcrypt() password hashing algorithm.