argon2-kdf 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +3 -0
- data/LICENSE.txt +22 -0
- data/README.md +45 -0
- data/lib/argon2/kdf.rb +58 -0
- data/lib/argon2/kdf/ffi.rb +30 -0
- data/lib/argon2/kdf/version.rb +5 -0
- data/vendor/LICENSE +314 -0
- data/vendor/argon2.dll +0 -0
- data/vendor/libargon2.dylib +0 -0
- data/vendor/libargon2.so +0 -0
- metadata +94 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f019623035aea784f0cea6cc9ad0bb5b1b00c90809ee02ac3510b1109d4da9c8
|
4
|
+
data.tar.gz: ef9230c7006e9bb1f0d898133fcc9bbbabcc6c9884093829de11209dca8e9b89
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 23805c54f020514be5c33d0282322f2fdc653b2add0e1b729f663c43e13bef0b05b4ac8d851f98fc51e6d3aef3c9dba89fb160393c7e1b7cee02f4d10bf8e874
|
7
|
+
data.tar.gz: 3cb87e907f3ec89274f08e5125b579799db4a3d8af16f2ad4e523e1e9f22399070a5ac63113a64bbae8c10777f56ec91bb329479024616d3f3b4c306983b4c54
|
data/CHANGELOG.md
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2020 Andrew Kane
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# Argon2 KDF
|
2
|
+
|
3
|
+
[Argon2](https://github.com/P-H-C/phc-winner-argon2) key derivation for Ruby
|
4
|
+
|
5
|
+
- No dependencies
|
6
|
+
- Works on Linux, Mac, and Windows
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application’s Gemfile:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
gem 'argon2-kdf'
|
14
|
+
```
|
15
|
+
|
16
|
+
## Getting Started
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
Argon2::KDF.argon2id("pass", salt: "salt", t: 3, m: 15, p: 1, length: 32)
|
20
|
+
```
|
21
|
+
|
22
|
+
`argon2i` and `argon2d` are also supported
|
23
|
+
|
24
|
+
## History
|
25
|
+
|
26
|
+
View the [changelog](https://github.com/ankane/argon2-kdf/blob/master/CHANGELOG.md)
|
27
|
+
|
28
|
+
## Contributing
|
29
|
+
|
30
|
+
Everyone is encouraged to help improve this project. Here are a few ways you can help:
|
31
|
+
|
32
|
+
- [Report bugs](https://github.com/ankane/argon2-kdf/issues)
|
33
|
+
- Fix bugs and [submit pull requests](https://github.com/ankane/argon2-kdf/pulls)
|
34
|
+
- Write, clarify, or fix documentation
|
35
|
+
- Suggest or add new features
|
36
|
+
|
37
|
+
To get started with development:
|
38
|
+
|
39
|
+
```sh
|
40
|
+
git clone https://github.com/ankane/argon2-kdf.git
|
41
|
+
cd argon2-kdf
|
42
|
+
bundle install
|
43
|
+
bundle exec rake vendor:all
|
44
|
+
bundle exec rake test
|
45
|
+
```
|
data/lib/argon2/kdf.rb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
# stdlib
|
2
|
+
require "fiddle/import"
|
3
|
+
|
4
|
+
# modules
|
5
|
+
require "argon2/kdf/version"
|
6
|
+
|
7
|
+
module Argon2
|
8
|
+
module KDF
|
9
|
+
class Error < StandardError; end
|
10
|
+
|
11
|
+
class << self
|
12
|
+
attr_accessor :ffi_lib
|
13
|
+
end
|
14
|
+
lib_name =
|
15
|
+
if Gem.win_platform?
|
16
|
+
"argon2.dll"
|
17
|
+
elsif RbConfig::CONFIG["host_os"] =~ /darwin/i
|
18
|
+
"libargon2.dylib"
|
19
|
+
else
|
20
|
+
"libargon2.so"
|
21
|
+
end
|
22
|
+
vendor_lib = File.expand_path("../../vendor/#{lib_name}", __dir__)
|
23
|
+
self.ffi_lib = [vendor_lib]
|
24
|
+
|
25
|
+
# friendlier error message
|
26
|
+
autoload :FFI, "argon2/kdf/ffi"
|
27
|
+
|
28
|
+
class << self
|
29
|
+
def argon2i(pass, salt:, t:, m:, p:, length:)
|
30
|
+
kdf(:argon2i, pass, salt, t, m, p, length)
|
31
|
+
end
|
32
|
+
|
33
|
+
def argon2d(pass, salt:, t:, m:, p:, length:)
|
34
|
+
kdf(:argon2d, pass, salt, t, m, p, length)
|
35
|
+
end
|
36
|
+
|
37
|
+
def argon2id(pass, salt:, t:, m:, p:, length:)
|
38
|
+
kdf(:argon2id, pass, salt, t, m, p, length)
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def kdf(variant, pass, salt, t, m, p, length)
|
44
|
+
pwd = Fiddle::Pointer[pass.to_str]
|
45
|
+
salt = Fiddle::Pointer[salt.to_str]
|
46
|
+
hash = Fiddle::Pointer.malloc(length)
|
47
|
+
check_status FFI.send("#{variant}_hash_raw", t, 1 << m, p, pwd, pwd.size, salt, salt.size, hash, hash.size)
|
48
|
+
hash[0, hash.size]
|
49
|
+
end
|
50
|
+
|
51
|
+
def check_status(status)
|
52
|
+
if status != 0
|
53
|
+
raise Error, FFI.argon2_error_message(status).to_s
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Argon2
|
2
|
+
module KDF
|
3
|
+
module FFI
|
4
|
+
extend Fiddle::Importer
|
5
|
+
|
6
|
+
libs = Array(Argon2::KDF.ffi_lib).dup
|
7
|
+
begin
|
8
|
+
dlload Fiddle.dlopen(libs.shift)
|
9
|
+
rescue Fiddle::DLError => e
|
10
|
+
retry if libs.any?
|
11
|
+
raise e if ENV["ARGON2_KDF_DEBUG"]
|
12
|
+
raise LoadError, "Could not find Argon2"
|
13
|
+
end
|
14
|
+
|
15
|
+
# https://github.com/P-H-C/phc-winner-argon2/blob/master/include/argon2.h
|
16
|
+
|
17
|
+
if Fiddle::SIZEOF_INT == 4
|
18
|
+
typealias "uint32_t", "uint"
|
19
|
+
else
|
20
|
+
# TODO try to find 4 byte type
|
21
|
+
raise "Expected int to be 4 bytes, got #{Fiddle::SIZEOF_INT}"
|
22
|
+
end
|
23
|
+
|
24
|
+
extern "int argon2i_hash_raw(uint32_t t_cost, uint32_t m_cost, uint32_t parallelism, void *pwd, size_t pwdlen, void *salt, size_t saltlen, void *hash, size_t hashlen)"
|
25
|
+
extern "int argon2d_hash_raw(uint32_t t_cost, uint32_t m_cost, uint32_t parallelism, void *pwd, size_t pwdlen, void *salt, size_t saltlen, void *hash, size_t hashlen)"
|
26
|
+
extern "int argon2id_hash_raw(uint32_t t_cost, uint32_t m_cost, uint32_t parallelism, void *pwd, size_t pwdlen, void *salt, size_t saltlen, void *hash, size_t hashlen)"
|
27
|
+
extern "char *argon2_error_message(int error_code)"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/vendor/LICENSE
ADDED
@@ -0,0 +1,314 @@
|
|
1
|
+
Argon2 reference source code package - reference C implementations
|
2
|
+
|
3
|
+
Copyright 2015
|
4
|
+
Daniel Dinu, Dmitry Khovratovich, Jean-Philippe Aumasson, and Samuel Neves
|
5
|
+
|
6
|
+
You may use this work under the terms of a Creative Commons CC0 1.0
|
7
|
+
License/Waiver or the Apache Public License 2.0, at your option. The terms of
|
8
|
+
these licenses can be found at:
|
9
|
+
|
10
|
+
- CC0 1.0 Universal : http://creativecommons.org/publicdomain/zero/1.0
|
11
|
+
- Apache 2.0 : http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
|
13
|
+
The terms of the licenses are reproduced below.
|
14
|
+
|
15
|
+
--------------------------------------------------------------------------------
|
16
|
+
|
17
|
+
Creative Commons Legal Code
|
18
|
+
|
19
|
+
CC0 1.0 Universal
|
20
|
+
|
21
|
+
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
22
|
+
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
23
|
+
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
24
|
+
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
25
|
+
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
26
|
+
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
27
|
+
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
28
|
+
HEREUNDER.
|
29
|
+
|
30
|
+
Statement of Purpose
|
31
|
+
|
32
|
+
The laws of most jurisdictions throughout the world automatically confer
|
33
|
+
exclusive Copyright and Related Rights (defined below) upon the creator
|
34
|
+
and subsequent owner(s) (each and all, an "owner") of an original work of
|
35
|
+
authorship and/or a database (each, a "Work").
|
36
|
+
|
37
|
+
Certain owners wish to permanently relinquish those rights to a Work for
|
38
|
+
the purpose of contributing to a commons of creative, cultural and
|
39
|
+
scientific works ("Commons") that the public can reliably and without fear
|
40
|
+
of later claims of infringement build upon, modify, incorporate in other
|
41
|
+
works, reuse and redistribute as freely as possible in any form whatsoever
|
42
|
+
and for any purposes, including without limitation commercial purposes.
|
43
|
+
These owners may contribute to the Commons to promote the ideal of a free
|
44
|
+
culture and the further production of creative, cultural and scientific
|
45
|
+
works, or to gain reputation or greater distribution for their Work in
|
46
|
+
part through the use and efforts of others.
|
47
|
+
|
48
|
+
For these and/or other purposes and motivations, and without any
|
49
|
+
expectation of additional consideration or compensation, the person
|
50
|
+
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
51
|
+
is an owner of Copyright and Related Rights in the Work, voluntarily
|
52
|
+
elects to apply CC0 to the Work and publicly distribute the Work under its
|
53
|
+
terms, with knowledge of his or her Copyright and Related Rights in the
|
54
|
+
Work and the meaning and intended legal effect of CC0 on those rights.
|
55
|
+
|
56
|
+
1. Copyright and Related Rights. A Work made available under CC0 may be
|
57
|
+
protected by copyright and related or neighboring rights ("Copyright and
|
58
|
+
Related Rights"). Copyright and Related Rights include, but are not
|
59
|
+
limited to, the following:
|
60
|
+
|
61
|
+
i. the right to reproduce, adapt, distribute, perform, display,
|
62
|
+
communicate, and translate a Work;
|
63
|
+
ii. moral rights retained by the original author(s) and/or performer(s);
|
64
|
+
iii. publicity and privacy rights pertaining to a person's image or
|
65
|
+
likeness depicted in a Work;
|
66
|
+
iv. rights protecting against unfair competition in regards to a Work,
|
67
|
+
subject to the limitations in paragraph 4(a), below;
|
68
|
+
v. rights protecting the extraction, dissemination, use and reuse of data
|
69
|
+
in a Work;
|
70
|
+
vi. database rights (such as those arising under Directive 96/9/EC of the
|
71
|
+
European Parliament and of the Council of 11 March 1996 on the legal
|
72
|
+
protection of databases, and under any national implementation
|
73
|
+
thereof, including any amended or successor version of such
|
74
|
+
directive); and
|
75
|
+
vii. other similar, equivalent or corresponding rights throughout the
|
76
|
+
world based on applicable law or treaty, and any national
|
77
|
+
implementations thereof.
|
78
|
+
|
79
|
+
2. Waiver. To the greatest extent permitted by, but not in contravention
|
80
|
+
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
81
|
+
irrevocably and unconditionally waives, abandons, and surrenders all of
|
82
|
+
Affirmer's Copyright and Related Rights and associated claims and causes
|
83
|
+
of action, whether now known or unknown (including existing as well as
|
84
|
+
future claims and causes of action), in the Work (i) in all territories
|
85
|
+
worldwide, (ii) for the maximum duration provided by applicable law or
|
86
|
+
treaty (including future time extensions), (iii) in any current or future
|
87
|
+
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
88
|
+
including without limitation commercial, advertising or promotional
|
89
|
+
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
90
|
+
member of the public at large and to the detriment of Affirmer's heirs and
|
91
|
+
successors, fully intending that such Waiver shall not be subject to
|
92
|
+
revocation, rescission, cancellation, termination, or any other legal or
|
93
|
+
equitable action to disrupt the quiet enjoyment of the Work by the public
|
94
|
+
as contemplated by Affirmer's express Statement of Purpose.
|
95
|
+
|
96
|
+
3. Public License Fallback. Should any part of the Waiver for any reason
|
97
|
+
be judged legally invalid or ineffective under applicable law, then the
|
98
|
+
Waiver shall be preserved to the maximum extent permitted taking into
|
99
|
+
account Affirmer's express Statement of Purpose. In addition, to the
|
100
|
+
extent the Waiver is so judged Affirmer hereby grants to each affected
|
101
|
+
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
102
|
+
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
103
|
+
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
104
|
+
maximum duration provided by applicable law or treaty (including future
|
105
|
+
time extensions), (iii) in any current or future medium and for any number
|
106
|
+
of copies, and (iv) for any purpose whatsoever, including without
|
107
|
+
limitation commercial, advertising or promotional purposes (the
|
108
|
+
"License"). The License shall be deemed effective as of the date CC0 was
|
109
|
+
applied by Affirmer to the Work. Should any part of the License for any
|
110
|
+
reason be judged legally invalid or ineffective under applicable law, such
|
111
|
+
partial invalidity or ineffectiveness shall not invalidate the remainder
|
112
|
+
of the License, and in such case Affirmer hereby affirms that he or she
|
113
|
+
will not (i) exercise any of his or her remaining Copyright and Related
|
114
|
+
Rights in the Work or (ii) assert any associated claims and causes of
|
115
|
+
action with respect to the Work, in either case contrary to Affirmer's
|
116
|
+
express Statement of Purpose.
|
117
|
+
|
118
|
+
4. Limitations and Disclaimers.
|
119
|
+
|
120
|
+
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
121
|
+
surrendered, licensed or otherwise affected by this document.
|
122
|
+
b. Affirmer offers the Work as-is and makes no representations or
|
123
|
+
warranties of any kind concerning the Work, express, implied,
|
124
|
+
statutory or otherwise, including without limitation warranties of
|
125
|
+
title, merchantability, fitness for a particular purpose, non
|
126
|
+
infringement, or the absence of latent or other defects, accuracy, or
|
127
|
+
the present or absence of errors, whether or not discoverable, all to
|
128
|
+
the greatest extent permissible under applicable law.
|
129
|
+
c. Affirmer disclaims responsibility for clearing rights of other persons
|
130
|
+
that may apply to the Work or any use thereof, including without
|
131
|
+
limitation any person's Copyright and Related Rights in the Work.
|
132
|
+
Further, Affirmer disclaims responsibility for obtaining any necessary
|
133
|
+
consents, permissions or other rights required for any use of the
|
134
|
+
Work.
|
135
|
+
d. Affirmer understands and acknowledges that Creative Commons is not a
|
136
|
+
party to this document and has no duty or obligation with respect to
|
137
|
+
this CC0 or use of the Work.
|
138
|
+
|
139
|
+
--------------------------------------------------------------------------------
|
140
|
+
|
141
|
+
Apache License
|
142
|
+
Version 2.0, January 2004
|
143
|
+
http://www.apache.org/licenses/
|
144
|
+
|
145
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
146
|
+
|
147
|
+
1. Definitions.
|
148
|
+
|
149
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
150
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
151
|
+
|
152
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
153
|
+
the copyright owner that is granting the License.
|
154
|
+
|
155
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
156
|
+
other entities that control, are controlled by, or are under common
|
157
|
+
control with that entity. For the purposes of this definition,
|
158
|
+
"control" means (i) the power, direct or indirect, to cause the
|
159
|
+
direction or management of such entity, whether by contract or
|
160
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
161
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
162
|
+
|
163
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
164
|
+
exercising permissions granted by this License.
|
165
|
+
|
166
|
+
"Source" form shall mean the preferred form for making modifications,
|
167
|
+
including but not limited to software source code, documentation
|
168
|
+
source, and configuration files.
|
169
|
+
|
170
|
+
"Object" form shall mean any form resulting from mechanical
|
171
|
+
transformation or translation of a Source form, including but
|
172
|
+
not limited to compiled object code, generated documentation,
|
173
|
+
and conversions to other media types.
|
174
|
+
|
175
|
+
"Work" shall mean the work of authorship, whether in Source or
|
176
|
+
Object form, made available under the License, as indicated by a
|
177
|
+
copyright notice that is included in or attached to the work
|
178
|
+
(an example is provided in the Appendix below).
|
179
|
+
|
180
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
181
|
+
form, that is based on (or derived from) the Work and for which the
|
182
|
+
editorial revisions, annotations, elaborations, or other modifications
|
183
|
+
represent, as a whole, an original work of authorship. For the purposes
|
184
|
+
of this License, Derivative Works shall not include works that remain
|
185
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
186
|
+
the Work and Derivative Works thereof.
|
187
|
+
|
188
|
+
"Contribution" shall mean any work of authorship, including
|
189
|
+
the original version of the Work and any modifications or additions
|
190
|
+
to that Work or Derivative Works thereof, that is intentionally
|
191
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
192
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
193
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
194
|
+
means any form of electronic, verbal, or written communication sent
|
195
|
+
to the Licensor or its representatives, including but not limited to
|
196
|
+
communication on electronic mailing lists, source code control systems,
|
197
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
198
|
+
Licensor for the purpose of discussing and improving the Work, but
|
199
|
+
excluding communication that is conspicuously marked or otherwise
|
200
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
201
|
+
|
202
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
203
|
+
on behalf of whom a Contribution has been received by Licensor and
|
204
|
+
subsequently incorporated within the Work.
|
205
|
+
|
206
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
207
|
+
this License, each Contributor hereby grants to You a perpetual,
|
208
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
209
|
+
copyright license to reproduce, prepare Derivative Works of,
|
210
|
+
publicly display, publicly perform, sublicense, and distribute the
|
211
|
+
Work and such Derivative Works in Source or Object form.
|
212
|
+
|
213
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
214
|
+
this License, each Contributor hereby grants to You a perpetual,
|
215
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
216
|
+
(except as stated in this section) patent license to make, have made,
|
217
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
218
|
+
where such license applies only to those patent claims licensable
|
219
|
+
by such Contributor that are necessarily infringed by their
|
220
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
221
|
+
with the Work to which such Contribution(s) was submitted. If You
|
222
|
+
institute patent litigation against any entity (including a
|
223
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
224
|
+
or a Contribution incorporated within the Work constitutes direct
|
225
|
+
or contributory patent infringement, then any patent licenses
|
226
|
+
granted to You under this License for that Work shall terminate
|
227
|
+
as of the date such litigation is filed.
|
228
|
+
|
229
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
230
|
+
Work or Derivative Works thereof in any medium, with or without
|
231
|
+
modifications, and in Source or Object form, provided that You
|
232
|
+
meet the following conditions:
|
233
|
+
|
234
|
+
(a) You must give any other recipients of the Work or
|
235
|
+
Derivative Works a copy of this License; and
|
236
|
+
|
237
|
+
(b) You must cause any modified files to carry prominent notices
|
238
|
+
stating that You changed the files; and
|
239
|
+
|
240
|
+
(c) You must retain, in the Source form of any Derivative Works
|
241
|
+
that You distribute, all copyright, patent, trademark, and
|
242
|
+
attribution notices from the Source form of the Work,
|
243
|
+
excluding those notices that do not pertain to any part of
|
244
|
+
the Derivative Works; and
|
245
|
+
|
246
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
247
|
+
distribution, then any Derivative Works that You distribute must
|
248
|
+
include a readable copy of the attribution notices contained
|
249
|
+
within such NOTICE file, excluding those notices that do not
|
250
|
+
pertain to any part of the Derivative Works, in at least one
|
251
|
+
of the following places: within a NOTICE text file distributed
|
252
|
+
as part of the Derivative Works; within the Source form or
|
253
|
+
documentation, if provided along with the Derivative Works; or,
|
254
|
+
within a display generated by the Derivative Works, if and
|
255
|
+
wherever such third-party notices normally appear. The contents
|
256
|
+
of the NOTICE file are for informational purposes only and
|
257
|
+
do not modify the License. You may add Your own attribution
|
258
|
+
notices within Derivative Works that You distribute, alongside
|
259
|
+
or as an addendum to the NOTICE text from the Work, provided
|
260
|
+
that such additional attribution notices cannot be construed
|
261
|
+
as modifying the License.
|
262
|
+
|
263
|
+
You may add Your own copyright statement to Your modifications and
|
264
|
+
may provide additional or different license terms and conditions
|
265
|
+
for use, reproduction, or distribution of Your modifications, or
|
266
|
+
for any such Derivative Works as a whole, provided Your use,
|
267
|
+
reproduction, and distribution of the Work otherwise complies with
|
268
|
+
the conditions stated in this License.
|
269
|
+
|
270
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
271
|
+
any Contribution intentionally submitted for inclusion in the Work
|
272
|
+
by You to the Licensor shall be under the terms and conditions of
|
273
|
+
this License, without any additional terms or conditions.
|
274
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
275
|
+
the terms of any separate license agreement you may have executed
|
276
|
+
with Licensor regarding such Contributions.
|
277
|
+
|
278
|
+
6. Trademarks. This License does not grant permission to use the trade
|
279
|
+
names, trademarks, service marks, or product names of the Licensor,
|
280
|
+
except as required for reasonable and customary use in describing the
|
281
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
282
|
+
|
283
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
284
|
+
agreed to in writing, Licensor provides the Work (and each
|
285
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
286
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
287
|
+
implied, including, without limitation, any warranties or conditions
|
288
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
289
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
290
|
+
appropriateness of using or redistributing the Work and assume any
|
291
|
+
risks associated with Your exercise of permissions under this License.
|
292
|
+
|
293
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
294
|
+
whether in tort (including negligence), contract, or otherwise,
|
295
|
+
unless required by applicable law (such as deliberate and grossly
|
296
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
297
|
+
liable to You for damages, including any direct, indirect, special,
|
298
|
+
incidental, or consequential damages of any character arising as a
|
299
|
+
result of this License or out of the use or inability to use the
|
300
|
+
Work (including but not limited to damages for loss of goodwill,
|
301
|
+
work stoppage, computer failure or malfunction, or any and all
|
302
|
+
other commercial damages or losses), even if such Contributor
|
303
|
+
has been advised of the possibility of such damages.
|
304
|
+
|
305
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
306
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
307
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
308
|
+
or other liability obligations and/or rights consistent with this
|
309
|
+
License. However, in accepting such obligations, You may act only
|
310
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
311
|
+
of any other Contributor, and only if You agree to indemnify,
|
312
|
+
defend, and hold each Contributor harmless for any liability
|
313
|
+
incurred by, or claims asserted against, such Contributor by reason
|
314
|
+
of your accepting any such warranty or additional liability.
|
data/vendor/argon2.dll
ADDED
Binary file
|
Binary file
|
data/vendor/libargon2.so
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: argon2-kdf
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Andrew Kane
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-02-10 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: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '5'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5'
|
55
|
+
description:
|
56
|
+
email: andrew@chartkick.com
|
57
|
+
executables: []
|
58
|
+
extensions: []
|
59
|
+
extra_rdoc_files: []
|
60
|
+
files:
|
61
|
+
- CHANGELOG.md
|
62
|
+
- LICENSE.txt
|
63
|
+
- README.md
|
64
|
+
- lib/argon2/kdf.rb
|
65
|
+
- lib/argon2/kdf/ffi.rb
|
66
|
+
- lib/argon2/kdf/version.rb
|
67
|
+
- vendor/LICENSE
|
68
|
+
- vendor/argon2.dll
|
69
|
+
- vendor/libargon2.dylib
|
70
|
+
- vendor/libargon2.so
|
71
|
+
homepage: https://github.com/ankane/argon2-kdf
|
72
|
+
licenses:
|
73
|
+
- MIT
|
74
|
+
metadata: {}
|
75
|
+
post_install_message:
|
76
|
+
rdoc_options: []
|
77
|
+
require_paths:
|
78
|
+
- lib
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '2.4'
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
requirements: []
|
90
|
+
rubygems_version: 3.1.2
|
91
|
+
signing_key:
|
92
|
+
specification_version: 4
|
93
|
+
summary: Argon2 key derivation for Ruby
|
94
|
+
test_files: []
|