libpasta 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.gitmodules +3 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +37 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/ext/Rakefile +9 -0
- data/ext/pasta-bindings/.gitmodules +3 -0
- data/ext/pasta-bindings/Makefile +84 -0
- data/ext/pasta-bindings/README.md +54 -0
- data/ext/pasta-bindings/libpasta/.gitignore +2 -0
- data/ext/pasta-bindings/libpasta/.travis.yml +60 -0
- data/ext/pasta-bindings/libpasta/Cargo.toml +42 -0
- data/ext/pasta-bindings/libpasta/LICENSE.md +21 -0
- data/ext/pasta-bindings/libpasta/Makefile +27 -0
- data/ext/pasta-bindings/libpasta/README.md +78 -0
- data/ext/pasta-bindings/libpasta/benches/bench.rs +125 -0
- data/ext/pasta-bindings/libpasta/examples/alternate_key_source.rs +33 -0
- data/ext/pasta-bindings/libpasta/examples/config.rs +10 -0
- data/ext/pasta-bindings/libpasta/examples/config_hmac.rs +25 -0
- data/ext/pasta-bindings/libpasta/examples/hash_password.rs +10 -0
- data/ext/pasta-bindings/libpasta/examples/migrate_password.rs +47 -0
- data/ext/pasta-bindings/libpasta/examples/verify_password.rs +24 -0
- data/ext/pasta-bindings/libpasta/libpasta-capi/Cargo.toml +12 -0
- data/ext/pasta-bindings/libpasta/libpasta-capi/ctest/compile +6 -0
- data/ext/pasta-bindings/libpasta/libpasta-capi/ctest/test +0 -0
- data/ext/pasta-bindings/libpasta/libpasta-capi/ctest/test.c +12 -0
- data/ext/pasta-bindings/libpasta/libpasta-capi/include/pasta.h +6 -0
- data/ext/pasta-bindings/libpasta/libpasta-capi/src/lib.rs +80 -0
- data/ext/pasta-bindings/libpasta/src/bench.rs +39 -0
- data/ext/pasta-bindings/libpasta/src/config.rs +358 -0
- data/ext/pasta-bindings/libpasta/src/hashing/de.rs +284 -0
- data/ext/pasta-bindings/libpasta/src/hashing/mod.rs +161 -0
- data/ext/pasta-bindings/libpasta/src/hashing/ser.rs +67 -0
- data/ext/pasta-bindings/libpasta/src/key/mod.rs +66 -0
- data/ext/pasta-bindings/libpasta/src/lib.rs +468 -0
- data/ext/pasta-bindings/libpasta/src/primitives/argon2.rs +180 -0
- data/ext/pasta-bindings/libpasta/src/primitives/bcrypt.rs +165 -0
- data/ext/pasta-bindings/libpasta/src/primitives/hmac.rs +134 -0
- data/ext/pasta-bindings/libpasta/src/primitives/mod.rs +312 -0
- data/ext/pasta-bindings/libpasta/src/primitives/pbkdf2.rs +272 -0
- data/ext/pasta-bindings/libpasta/src/primitives/scrypt.rs +144 -0
- data/ext/pasta-bindings/libpasta/src/sod.rs +46 -0
- data/ext/pasta-bindings/libpasta/tests/.libpasta.yaml +8 -0
- data/ext/pasta-bindings/libpasta/tests/common/mod.rs +37 -0
- data/ext/pasta-bindings/libpasta/tests/test_argon2.rs +8 -0
- data/ext/pasta-bindings/libpasta/tests/test_bcrypt.rs +8 -0
- data/ext/pasta-bindings/libpasta/tests/test_from_file.rs +13 -0
- data/ext/pasta-bindings/libpasta/tests/test_hmac.rs +26 -0
- data/ext/pasta-bindings/libpasta/tests/test_pbkdf2.rs +8 -0
- data/ext/pasta-bindings/libpasta/tests/test_ringpbkdf2.rs +8 -0
- data/ext/pasta-bindings/libpasta/tests/test_scrypt.rs +8 -0
- data/ext/pasta-bindings/pasta.i +31 -0
- data/ext/pasta-bindings/tests/Makefile +38 -0
- data/ext/pasta-bindings/tests/pasta_test.go +12 -0
- data/ext/pasta-bindings/tests/test.php +7 -0
- data/ext/pasta-bindings/tests/test.py +7 -0
- data/ext/pasta-bindings/tests/test.rb +5 -0
- data/lib/libpasta.rb +2 -0
- data/lib/libpasta/version.rb +3 -0
- data/libpasta.gemspec +52 -0
- data/spec/libpasta_spec.rb +11 -0
- data/spec/spec_helper.rb +11 -0
- metadata +183 -0
data/lib/libpasta.rb
ADDED
data/libpasta.gemspec
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'libpasta/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "libpasta"
|
8
|
+
spec.version = Libpasta::VERSION
|
9
|
+
spec.authors = ["Sam Scott"]
|
10
|
+
spec.email = ["sam.scott89@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = "Easy-to-use, secure-by-default password hashing library"
|
13
|
+
# spec.description = %q{TODO: Write a longer description or delete this line.}
|
14
|
+
spec.homepage = "https://libpasta.github.io/"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
# if spec.respond_to?(:metadata)
|
20
|
+
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
21
|
+
# else
|
22
|
+
# raise "RubyGems 2.0 or newer is required to protect against " \
|
23
|
+
# "public gem pushes."
|
24
|
+
# end
|
25
|
+
|
26
|
+
|
27
|
+
spec.files = `git ls-files`.split("\n")
|
28
|
+
|
29
|
+
|
30
|
+
# get an array of submodule dirs by executing 'pwd' inside each submodule
|
31
|
+
gem_dir = File.expand_path(File.dirname(__FILE__)) + "/"
|
32
|
+
`git submodule --quiet foreach --recursive pwd`.split($\).each do |submodule_path|
|
33
|
+
Dir.chdir(submodule_path) do
|
34
|
+
submodule_relative_path = submodule_path.sub gem_dir, ""
|
35
|
+
# issue git ls-files in submodule's directory and
|
36
|
+
# prepend the submodule path to create absolute file paths
|
37
|
+
`git ls-files`.split($\).each do |filename|
|
38
|
+
spec.files << "#{submodule_relative_path}/#{filename}"
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
spec.require_paths = ["lib"]
|
44
|
+
spec.extensions = ["Rakefile", 'ext/Rakefile']
|
45
|
+
|
46
|
+
spec.add_development_dependency "bundler", "~> 1.14"
|
47
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
48
|
+
spec.add_development_dependency "rake-compiler"
|
49
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
50
|
+
|
51
|
+
spec.add_runtime_dependency 'thermite', '~> 0'
|
52
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require "bundler/setup"
|
2
|
+
require "libpasta"
|
3
|
+
|
4
|
+
RSpec.configure do |config|
|
5
|
+
# Enable flags like --only-failures and --next-failure
|
6
|
+
config.example_status_persistence_file_path = ".rspec_status"
|
7
|
+
|
8
|
+
config.expect_with :rspec do |c|
|
9
|
+
c.syntax = :expect
|
10
|
+
end
|
11
|
+
end
|
metadata
ADDED
@@ -0,0 +1,183 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: libpasta
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.5
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Sam Scott
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-12-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.14'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.14'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake-compiler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: thermite
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description:
|
84
|
+
email:
|
85
|
+
- sam.scott89@gmail.com
|
86
|
+
executables: []
|
87
|
+
extensions:
|
88
|
+
- Rakefile
|
89
|
+
- ext/Rakefile
|
90
|
+
extra_rdoc_files: []
|
91
|
+
files:
|
92
|
+
- ".gitignore"
|
93
|
+
- ".gitmodules"
|
94
|
+
- ".rspec"
|
95
|
+
- ".travis.yml"
|
96
|
+
- Gemfile
|
97
|
+
- LICENSE.txt
|
98
|
+
- README.md
|
99
|
+
- Rakefile
|
100
|
+
- bin/console
|
101
|
+
- bin/setup
|
102
|
+
- ext/Rakefile
|
103
|
+
- ext/pasta-bindings/.gitmodules
|
104
|
+
- ext/pasta-bindings/Makefile
|
105
|
+
- ext/pasta-bindings/README.md
|
106
|
+
- ext/pasta-bindings/libpasta/.gitignore
|
107
|
+
- ext/pasta-bindings/libpasta/.travis.yml
|
108
|
+
- ext/pasta-bindings/libpasta/Cargo.toml
|
109
|
+
- ext/pasta-bindings/libpasta/LICENSE.md
|
110
|
+
- ext/pasta-bindings/libpasta/Makefile
|
111
|
+
- ext/pasta-bindings/libpasta/README.md
|
112
|
+
- ext/pasta-bindings/libpasta/benches/bench.rs
|
113
|
+
- ext/pasta-bindings/libpasta/examples/alternate_key_source.rs
|
114
|
+
- ext/pasta-bindings/libpasta/examples/config.rs
|
115
|
+
- ext/pasta-bindings/libpasta/examples/config_hmac.rs
|
116
|
+
- ext/pasta-bindings/libpasta/examples/hash_password.rs
|
117
|
+
- ext/pasta-bindings/libpasta/examples/migrate_password.rs
|
118
|
+
- ext/pasta-bindings/libpasta/examples/verify_password.rs
|
119
|
+
- ext/pasta-bindings/libpasta/libpasta-capi/Cargo.toml
|
120
|
+
- ext/pasta-bindings/libpasta/libpasta-capi/ctest/compile
|
121
|
+
- ext/pasta-bindings/libpasta/libpasta-capi/ctest/test
|
122
|
+
- ext/pasta-bindings/libpasta/libpasta-capi/ctest/test.c
|
123
|
+
- ext/pasta-bindings/libpasta/libpasta-capi/include/pasta.h
|
124
|
+
- ext/pasta-bindings/libpasta/libpasta-capi/src/lib.rs
|
125
|
+
- ext/pasta-bindings/libpasta/src/bench.rs
|
126
|
+
- ext/pasta-bindings/libpasta/src/config.rs
|
127
|
+
- ext/pasta-bindings/libpasta/src/hashing/de.rs
|
128
|
+
- ext/pasta-bindings/libpasta/src/hashing/mod.rs
|
129
|
+
- ext/pasta-bindings/libpasta/src/hashing/ser.rs
|
130
|
+
- ext/pasta-bindings/libpasta/src/key/mod.rs
|
131
|
+
- ext/pasta-bindings/libpasta/src/lib.rs
|
132
|
+
- ext/pasta-bindings/libpasta/src/primitives/argon2.rs
|
133
|
+
- ext/pasta-bindings/libpasta/src/primitives/bcrypt.rs
|
134
|
+
- ext/pasta-bindings/libpasta/src/primitives/hmac.rs
|
135
|
+
- ext/pasta-bindings/libpasta/src/primitives/mod.rs
|
136
|
+
- ext/pasta-bindings/libpasta/src/primitives/pbkdf2.rs
|
137
|
+
- ext/pasta-bindings/libpasta/src/primitives/scrypt.rs
|
138
|
+
- ext/pasta-bindings/libpasta/src/sod.rs
|
139
|
+
- ext/pasta-bindings/libpasta/tests/.libpasta.yaml
|
140
|
+
- ext/pasta-bindings/libpasta/tests/common/mod.rs
|
141
|
+
- ext/pasta-bindings/libpasta/tests/test_argon2.rs
|
142
|
+
- ext/pasta-bindings/libpasta/tests/test_bcrypt.rs
|
143
|
+
- ext/pasta-bindings/libpasta/tests/test_from_file.rs
|
144
|
+
- ext/pasta-bindings/libpasta/tests/test_hmac.rs
|
145
|
+
- ext/pasta-bindings/libpasta/tests/test_pbkdf2.rs
|
146
|
+
- ext/pasta-bindings/libpasta/tests/test_ringpbkdf2.rs
|
147
|
+
- ext/pasta-bindings/libpasta/tests/test_scrypt.rs
|
148
|
+
- ext/pasta-bindings/pasta.i
|
149
|
+
- ext/pasta-bindings/tests/Makefile
|
150
|
+
- ext/pasta-bindings/tests/pasta_test.go
|
151
|
+
- ext/pasta-bindings/tests/test.php
|
152
|
+
- ext/pasta-bindings/tests/test.py
|
153
|
+
- ext/pasta-bindings/tests/test.rb
|
154
|
+
- lib/libpasta.rb
|
155
|
+
- lib/libpasta/version.rb
|
156
|
+
- libpasta.gemspec
|
157
|
+
- spec/libpasta_spec.rb
|
158
|
+
- spec/spec_helper.rb
|
159
|
+
homepage: https://libpasta.github.io/
|
160
|
+
licenses:
|
161
|
+
- MIT
|
162
|
+
metadata: {}
|
163
|
+
post_install_message:
|
164
|
+
rdoc_options: []
|
165
|
+
require_paths:
|
166
|
+
- lib
|
167
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
168
|
+
requirements:
|
169
|
+
- - ">="
|
170
|
+
- !ruby/object:Gem::Version
|
171
|
+
version: '0'
|
172
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
173
|
+
requirements:
|
174
|
+
- - ">="
|
175
|
+
- !ruby/object:Gem::Version
|
176
|
+
version: '0'
|
177
|
+
requirements: []
|
178
|
+
rubyforge_project:
|
179
|
+
rubygems_version: 2.6.13
|
180
|
+
signing_key:
|
181
|
+
specification_version: 4
|
182
|
+
summary: Easy-to-use, secure-by-default password hashing library
|
183
|
+
test_files: []
|