scrypt 3.0.5 → 3.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 955aa0f2fa4a2231c541f953d4a2da9180dae7e5
4
- data.tar.gz: 792446e6d237a83c2f34883ecb190168bcbf5878
2
+ SHA256:
3
+ metadata.gz: 27fb084e997c8f5ef6c5eabc8c9823c62b9beb54be2297818ca70c47137b6b12
4
+ data.tar.gz: d37621255d1c455593543773f887ac00b12d8040664d886ed5838a5435c0b1c0
5
5
  SHA512:
6
- metadata.gz: 45d51dd3a6a46ba4bd24c3fc6fdb1f096c56206be660c2eed4c8ffa5e7f1b2e4f4a880f53c2b28a8fed60702965962e42f16235d926ca5d80d8ec49cbfa04fd8
7
- data.tar.gz: 06d532fb705850b5744c32eb51e13f68794ebb3d7a1f81d516194a4b0bab9183de254285da0786bd02e528b2eeaf4ffaa180e4af8e48f5340f01d5a05fbdb760
6
+ metadata.gz: 706b757097bbca08633e852dce8ac3e1e90f8eb1d82e4833ad9f2beefa9e50b3ccc304357b7a55d7cbfe8cfcaca31605bfbf4f28c68661f59e17f978073134be
7
+ data.tar.gz: 08de38a6a613855792aafc026df7320e67e2512b76f71231b2a5d46fb56e27c9d99d194435d23507e9d5ea4d3105840cbc7a619746fb523587b7a455bf4cd94d
Binary file
data.tar.gz.sig CHANGED
Binary file
data/Rakefile CHANGED
@@ -9,6 +9,9 @@ require 'rspec/core/rake_task'
9
9
  require 'ffi'
10
10
  require 'ffi-compiler/compile_task'
11
11
 
12
+ require 'digest/sha2'
13
+ require './lib/scrypt/version'
14
+
12
15
  require 'rubygems'
13
16
  require 'rubygems/package_task'
14
17
 
@@ -16,25 +19,41 @@ require 'rdoc/task'
16
19
 
17
20
  task :default => [:clean, :compile_ffi, :spec]
18
21
 
19
- desc "clean, make and run specs"
20
- task :spec do
22
+ desc 'clean, make and run specs'
23
+ task :spec do
21
24
  RSpec::Core::RakeTask.new
22
25
  end
23
26
 
24
- desc "FFI compiler"
25
- namespace "ffi-compiler" do
27
+ desc 'generate checksum'
28
+ task :checksum do
29
+ built_gem_path = "pkg/scrypt-#{SCrypt::VERSION}.gem"
30
+ checksum = Digest::SHA512.new.hexdigest(File.read(built_gem_path))
31
+ checksum_path = "checksum/scrypt-#{SCrypt::VERSION}.gem.sha512"
32
+ File.open(checksum_path, 'w' ) {|f| f.write(checksum) }
33
+ end
34
+
35
+ desc 'FFI compiler'
36
+ namespace 'ffi-compiler' do
26
37
  FFI::Compiler::CompileTask.new('ext/scrypt/scrypt_ext') do |t|
27
- t.cflags << "-Wall -std=c99"
28
- t.cflags << "-msse -msse2" if t.platform.arch.include? "86"
29
- t.cflags << "-D_GNU_SOURCE=1" if RbConfig::CONFIG["host_os"].downcase =~ /mingw/
30
- t.cflags << "-D_POSIX_C_SOURCE=199309L" if RbConfig::CONFIG['host_os'].downcase =~ /linux/
31
- t.cflags << "-arch x86_64 -arch i386" if t.platform.mac?
32
- t.ldflags << "-arch x86_64 -arch i386" if t.platform.mac?
38
+ target_cpu = RbConfig::CONFIG['target_cpu']
39
+
40
+ t.cflags << '-Wall -std=c99'
41
+ t.cflags << '-msse -msse2' if t.platform.arch.include? '86'
42
+ t.cflags << '-D_GNU_SOURCE=1' if RbConfig::CONFIG['host_os'].downcase =~ /mingw/
43
+ t.cflags << '-D_POSIX_C_SOURCE=199309L' if RbConfig::CONFIG['host_os'].downcase =~ /linux/
44
+
45
+ if 1.size == 4 && target_cpu =~ /i386|x86_32/ && t.platform.mac?
46
+ t.cflags << '-arch i386'
47
+ t.ldflags << '-arch i386'
48
+ elsif 1.size == 8 && target_cpu =~ /i686|x86_64/ && t.platform.mac?
49
+ t.cflags << '-arch x86_64'
50
+ t.ldflags << '-arch x86_64'
51
+ end
33
52
 
34
53
  t.add_define 'WINDOWS_OS' if FFI::Platform.windows?
35
54
  end
36
55
  end
37
- task :compile_ffi => ["ffi-compiler:default"]
56
+ task :compile_ffi => ['ffi-compiler:default']
38
57
 
39
58
  CLEAN.include('ext/scrypt/*{.o,.log,.so,.bundle}')
40
59
  CLEAN.include('lib/**/*{.o,.log,.so,.bundle}')
@@ -47,10 +66,9 @@ rd = Rake::RDocTask.new do |rdoc|
47
66
  rdoc.rdoc_files.include('COPYING', 'lib/**/*.rb')
48
67
  end
49
68
 
50
-
51
- desc "Run all specs"
52
- RSpec::Core::RakeTask.new do |t|
53
- rspec_opts = ['--colour','--backtrace']
69
+ desc 'Run all specs'
70
+ RSpec::Core::RakeTask.new do |_t|
71
+ rspec_opts = ['--colour', '--backtrace']
54
72
  end
55
73
 
56
74
  def gem_spec
@@ -62,3 +80,4 @@ Gem::PackageTask.new(gem_spec) do |pkg|
62
80
  pkg.need_tar = true
63
81
  pkg.package_dir = 'pkg'
64
82
  end
83
+
@@ -1,12 +1,21 @@
1
1
  require 'ffi-compiler/compile_task'
2
2
 
3
+ target_cpu = RbConfig::CONFIG['target_cpu']
4
+
3
5
  FFI::Compiler::CompileTask.new('scrypt_ext') do |t|
4
- t.cflags << "-Wall -std=c99"
5
- t.cflags << "-msse -msse2" if t.platform.arch.include? "86"
6
- t.cflags << "-D_GNU_SOURCE=1" if RbConfig::CONFIG["host_os"].downcase =~ /mingw/
7
- t.cflags << "-D_POSIX_C_SOURCE=199309L" if RbConfig::CONFIG['host_os'].downcase =~ /linux/
8
- t.cflags << "-arch x86_64 -arch i386" if t.platform.mac?
9
- t.ldflags << "-arch x86_64 -arch i386" if t.platform.mac?
6
+ t.cflags << '-Wall -std=c99'
7
+ t.cflags << '-msse -msse2' if t.platform.arch.include? '86'
8
+ t.cflags << '-D_GNU_SOURCE=1' if RbConfig::CONFIG['host_os'].downcase =~ /mingw/
9
+ t.cflags << '-D_POSIX_C_SOURCE=199309L' if RbConfig::CONFIG['host_os'].downcase =~ /linux/
10
+
11
+ if 1.size == 4 && target_cpu =~ /i386|x86_32/ && t.platform.mac?
12
+ t.cflags << '-arch i386'
13
+ t.ldflags << '-arch i386'
14
+ elsif 1.size == 8 && target_cpu =~ /i686|x86_64/ && t.platform.mac?
15
+ t.cflags << '-arch x86_64'
16
+ t.ldflags << '-arch x86_64'
17
+ end
18
+
10
19
  t.export '../../lib/scrypt/scrypt_ext.rb'
11
20
 
12
21
  t.add_define 'WINDOWS_OS' if FFI::Platform.windows?
@@ -1,3 +1,3 @@
1
1
  module SCrypt
2
- VERSION = "3.0.5"
2
+ VERSION = "3.0.6"
3
3
  end
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
8
8
  s.authors = ["Patrick Hogan", "Stephen von Takach", "Rene van Paassen" ]
9
9
  s.email = ["pbhogan@gmail.com", "steve@advancedcontrol.com.au",
10
10
  "rene.vanpaassen@gmail.com" ]
11
- s.cert_chain = ['certs/stakach.pem']
12
- s.license = 'MIT'
11
+ s.cert_chain = ['certs/pbhogan.pem']
12
+ s.license = 'BSD-3-Clause'
13
13
  s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
14
14
  s.homepage = "https://github.com/pbhogan/scrypt"
15
15
  s.summary = "scrypt password hashing algorithm."
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  EOF
21
21
 
22
22
  s.add_dependency 'ffi-compiler', '>= 1.0', '< 2.0'
23
- s.add_development_dependency 'rake', '>= 9', '< 12'
23
+ s.add_development_dependency 'rake', '>= 9', '< 13'
24
24
  s.add_development_dependency 'rspec', '>= 3', '< 4'
25
25
  s.add_development_dependency 'rdoc', '>= 4', '< 5'
26
26
  s.add_development_dependency 'awesome_print', '>= 1', '< 2'
@@ -34,3 +34,4 @@ Gem::Specification.new do |s|
34
34
  s.test_files = Dir.glob("spec/**/*")
35
35
  s.require_paths = ["lib"]
36
36
  end
37
+
@@ -132,8 +132,8 @@ describe "Old-style hashes" do
132
132
  end
133
133
 
134
134
  describe "Respecting standard ruby behaviors" do
135
- it 'should hash as a fixnum' do
135
+ it 'should hash as an integer' do
136
136
  password = SCrypt::Password.create('')
137
- expect(password.hash).to be_kind_of(Fixnum)
137
+ expect(password.hash).to be_kind_of(Integer)
138
138
  end
139
139
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrypt
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 3.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick Hogan
@@ -12,28 +12,32 @@ bindir: bin
12
12
  cert_chain:
13
13
  - |
14
14
  -----BEGIN CERTIFICATE-----
15
- MIIDvDCCAqSgAwIBAgIBATANBgkqhkiG9w0BAQUFADBaMQ4wDAYDVQQDDAVzdGV2
16
- ZTEfMB0GCgmSJomT8ixkARkWD2FkdmFuY2VkY29udHJvbDETMBEGCgmSJomT8ixk
17
- ARkWA2NvbTESMBAGCgmSJomT8ixkARkWAmF1MB4XDTE2MDYyNjIyMjMyMloXDTE3
18
- MDYyNjIyMjMyMlowWjEOMAwGA1UEAwwFc3RldmUxHzAdBgoJkiaJk/IsZAEZFg9h
19
- ZHZhbmNlZGNvbnRyb2wxEzARBgoJkiaJk/IsZAEZFgNjb20xEjAQBgoJkiaJk/Is
20
- ZAEZFgJhdTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKvI6Zfmxakj
21
- ADC7rWDhCtHDSCdn2jrzeMDO2xqq9P315j0x7YVglKF49Xz7OCnWGxn0Zzec22Ha
22
- xq2St09wLPtE6+/qTiq48ffxLKPR/Aahdk31HGx5AXDjRQ5p48m5CK3BDratshbi
23
- ssg2bVMOxMSnNowb5Mqc448X2shYHwfuo9C4fsvkn0eC+XtpwOKBsLJnmYxI8opB
24
- A6cL5onHD1JH5Ywt7mWn3XCGEZY98Hq3V7wpCACWSHP9FfCmf0Vyn30UTlBivoUh
25
- qmtLB+TDW4Qvma/1cc7p1e3HF9xQHSza9FTyfhzw/vxnSF+jT4upUtXdhCTMqqDv
26
- m597hs3/6z8CAwEAAaOBjDCBiTAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdB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6HQDyRk
38
+ zJEymUkjdHk3cmNgIQAhdQasTM1qSCToMw2dBwjlVKc=
35
39
  -----END CERTIFICATE-----
36
- date: 2017-03-19 00:00:00.000000000 Z
40
+ date: 2018-09-28 00:00:00.000000000 Z
37
41
  dependencies:
38
42
  - !ruby/object:Gem::Dependency
39
43
  name: ffi-compiler
@@ -64,7 +68,7 @@ dependencies:
64
68
  version: '9'
65
69
  - - "<"
66
70
  - !ruby/object:Gem::Version
67
- version: '12'
71
+ version: '13'
68
72
  type: :development
69
73
  prerelease: false
70
74
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,7 +78,7 @@ dependencies:
74
78
  version: '9'
75
79
  - - "<"
76
80
  - !ruby/object:Gem::Version
77
- version: '12'
81
+ version: '13'
78
82
  - !ruby/object:Gem::Dependency
79
83
  name: rspec
80
84
  requirement: !ruby/object:Gem::Requirement
@@ -188,7 +192,7 @@ files:
188
192
  - spec/spec_helper.rb
189
193
  homepage: https://github.com/pbhogan/scrypt
190
194
  licenses:
191
- - MIT
195
+ - BSD-3-Clause
192
196
  metadata: {}
193
197
  post_install_message:
194
198
  rdoc_options: []
@@ -206,12 +210,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
210
  version: '0'
207
211
  requirements: []
208
212
  rubyforge_project: scrypt
209
- rubygems_version: 2.6.10
213
+ rubygems_version: 2.7.7
210
214
  signing_key:
211
215
  specification_version: 4
212
216
  summary: scrypt password hashing algorithm.
213
217
  test_files:
214
- - spec/scrypt/engine_spec.rb
218
+ - spec/spec_helper.rb
215
219
  - spec/scrypt/password_spec.rb
220
+ - spec/scrypt/engine_spec.rb
216
221
  - spec/scrypt/utils_spec.rb
217
- - spec/spec_helper.rb
metadata.gz.sig CHANGED
Binary file