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 +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/Rakefile +34 -15
- data/ext/scrypt/Rakefile +15 -6
- data/lib/scrypt/version.rb +1 -1
- data/scrypt.gemspec +4 -3
- data/spec/scrypt/password_spec.rb +2 -2
- metadata +32 -28
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 27fb084e997c8f5ef6c5eabc8c9823c62b9beb54be2297818ca70c47137b6b12
|
4
|
+
data.tar.gz: d37621255d1c455593543773f887ac00b12d8040664d886ed5838a5435c0b1c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 706b757097bbca08633e852dce8ac3e1e90f8eb1d82e4833ad9f2beefa9e50b3ccc304357b7a55d7cbfe8cfcaca31605bfbf4f28c68661f59e17f978073134be
|
7
|
+
data.tar.gz: 08de38a6a613855792aafc026df7320e67e2512b76f71231b2a5d46fb56e27c9d99d194435d23507e9d5ea4d3105840cbc7a619746fb523587b7a455bf4cd94d
|
checksums.yaml.gz.sig
CHANGED
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
|
20
|
-
task :spec
|
22
|
+
desc 'clean, make and run specs'
|
23
|
+
task :spec do
|
21
24
|
RSpec::Core::RakeTask.new
|
22
25
|
end
|
23
26
|
|
24
|
-
desc
|
25
|
-
|
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
|
-
|
28
|
-
|
29
|
-
t.cflags <<
|
30
|
-
t.cflags <<
|
31
|
-
t.cflags <<
|
32
|
-
t.
|
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 => [
|
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
|
-
|
52
|
-
|
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
|
+
|
data/ext/scrypt/Rakefile
CHANGED
@@ -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 <<
|
5
|
-
t.cflags <<
|
6
|
-
t.cflags <<
|
7
|
-
t.cflags <<
|
8
|
-
|
9
|
-
|
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?
|
data/lib/scrypt/version.rb
CHANGED
data/scrypt.gemspec
CHANGED
@@ -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/
|
12
|
-
s.license = '
|
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', '<
|
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
|
135
|
+
it 'should hash as an integer' do
|
136
136
|
password = SCrypt::Password.create('')
|
137
|
-
expect(password.hash).to be_kind_of(
|
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.
|
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
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
15
|
+
MIIEbDCCAtSgAwIBAgIBATANBgkqhkiG9w0BAQsFADA+MRAwDgYDVQQDDAdwYmhv
|
16
|
+
Z2FuMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZFgNjb20w
|
17
|
+
HhcNMTgwOTI4MjEzNTU1WhcNMTkwOTI4MjEzNTU1WjA+MRAwDgYDVQQDDAdwYmhv
|
18
|
+
Z2FuMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZFgNjb20w
|
19
|
+
ggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC9zOef8L5HfWsmMpdRtigG
|
20
|
+
+Cc62cDOds9/dvB2EXIj7drRquP2kVhFZPWRKobUZr1s8ibxH38GOizgvh0JPyy4
|
21
|
+
iygA8iEAYoaTMMzid1wL+E4OUtk++BDJmSWbK8+qgXgiiSm2gZj0W121WvbjUMp7
|
22
|
+
XRRdIxnL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BWZcbe+
|
37
|
+
FcO692GiKUmAd9b5WSvSgKBKzrnWGSzvH2MiL9RUa5BaVleB5uDdr6s+H6HQDyRk
|
38
|
+
zJEymUkjdHk3cmNgIQAhdQasTM1qSCToMw2dBwjlVKc=
|
35
39
|
-----END CERTIFICATE-----
|
36
|
-
date:
|
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: '
|
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: '
|
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
|
-
-
|
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.
|
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/
|
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
|