sorcery-argon2 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.document +1 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
- data/.github/ISSUE_TEMPLATE/need_help.md +24 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +5 -0
- data/.github/workflows/ruby.yml +66 -0
- data/.gitignore +68 -0
- data/.gitmodules +4 -0
- data/.rubocop.yml +208 -0
- data/CHANGELOG.md +20 -0
- data/CODE_OF_CONDUCT.md +14 -0
- data/Gemfile +6 -0
- data/LICENSE.md +23 -0
- data/MAINTAINING.md +65 -0
- data/README.md +164 -0
- data/Rakefile +16 -0
- data/SECURITY.md +17 -0
- data/bin/console +15 -0
- data/bin/setup +11 -0
- data/bin/test +10 -0
- data/ext/argon2_wrap/Makefile +74 -0
- data/ext/argon2_wrap/argon_wrap.c +167 -0
- data/ext/argon2_wrap/extconf.rb +2 -0
- data/ext/argon2_wrap/test.c +117 -0
- data/lib/argon2.rb +17 -0
- data/lib/argon2/constants.rb +12 -0
- data/lib/argon2/engine.rb +18 -0
- data/lib/argon2/errors.rb +121 -0
- data/lib/argon2/ffi_engine.rb +114 -0
- data/lib/argon2/password.rb +220 -0
- data/lib/argon2/version.rb +8 -0
- data/sorcery-argon2.gemspec +51 -0
- metadata +191 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e7bb1388ca541ca05f53572cc0d55f32c290ee7d5df67756db049a41184c5ac1
|
4
|
+
data.tar.gz: eb9c9c6961628f0d1fab7b8fc9ffe1a40fddeae00e2494c919389a68bdf629f6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cbedd212398de7f232bb7beee55b824b1b222b59113a69caf235b2eba1af22ca80362b43996f4566c6c294cd95b1eba4116264ac785861bb2efe8446c0d04376
|
7
|
+
data.tar.gz: fe0996121338f875bbb230bd8130322ec64de823ae3d15524950afc8e8f189542fbe76c352c825c78108d7e0d4a8277e2bbc09ec7da702679a51c954f2808309
|
data/.document
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
lib/**/*.rb
|
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Create a report to help us improve
|
4
|
+
title: ''
|
5
|
+
labels: 'bug'
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
Please complete all sections; bug reports that cannot be reproduced will likely
|
11
|
+
be closed.
|
12
|
+
|
13
|
+
**Describe the bug**
|
14
|
+
A clear and concise description of what the bug is.
|
15
|
+
|
16
|
+
**To Reproduce**
|
17
|
+
Steps to reproduce the behavior:
|
18
|
+
1. Go to '...'
|
19
|
+
2. Click on '....'
|
20
|
+
3. Scroll down to '....'
|
21
|
+
4. See error
|
22
|
+
|
23
|
+
**Expected behavior**
|
24
|
+
A clear and concise description of what you expected to happen.
|
25
|
+
|
26
|
+
**Screenshots**
|
27
|
+
If applicable, add screenshots to help explain your problem.
|
28
|
+
|
29
|
+
**Configuration**
|
30
|
+
|
31
|
+
- Sorcery-Argon2 Version: ``
|
32
|
+
- Ruby Version: ``
|
33
|
+
- Framework: ``
|
34
|
+
- Platform: ``
|
35
|
+
|
36
|
+
**Additional context**
|
37
|
+
Add any other context about the problem here.
|
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
name: Feature request
|
3
|
+
about: Suggest an idea for this project
|
4
|
+
title: ''
|
5
|
+
labels: 'enhancement'
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always
|
12
|
+
frustrated when [...]
|
13
|
+
|
14
|
+
**Describe the solution you'd like**
|
15
|
+
A clear and concise description of what you want to happen.
|
16
|
+
|
17
|
+
**Describe alternatives you've considered**
|
18
|
+
A clear and concise description of any alternative solutions or features you've
|
19
|
+
considered.
|
20
|
+
|
21
|
+
**Additional context**
|
22
|
+
Add any other context or screenshots about the feature request here.
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
name: Need help
|
3
|
+
about: Ran into an issue using Sorcery-Argon2 and need assistance
|
4
|
+
title: ''
|
5
|
+
labels: 'question'
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Describe what you need help with**
|
11
|
+
A clear and concise description of what you are trying to do that isn't working.
|
12
|
+
|
13
|
+
**Screenshots**
|
14
|
+
If applicable, add screenshots to help explain your problem.
|
15
|
+
|
16
|
+
**Configuration**
|
17
|
+
|
18
|
+
- Sorcery-Argon2 Version: ``
|
19
|
+
- Ruby Version: ``
|
20
|
+
- Framework: ``
|
21
|
+
- Platform: ``
|
22
|
+
|
23
|
+
**Additional context**
|
24
|
+
Add any other context about the problem here.
|
@@ -0,0 +1,66 @@
|
|
1
|
+
name: Test Suite
|
2
|
+
|
3
|
+
# Run against all commits and pull requests.
|
4
|
+
on: [ push, pull_request ]
|
5
|
+
|
6
|
+
jobs:
|
7
|
+
test_matrix:
|
8
|
+
|
9
|
+
strategy:
|
10
|
+
fail-fast: false
|
11
|
+
matrix:
|
12
|
+
os:
|
13
|
+
- ubuntu
|
14
|
+
- macos
|
15
|
+
ruby:
|
16
|
+
- 2.5
|
17
|
+
- 2.6
|
18
|
+
- 2.7
|
19
|
+
- 3.0
|
20
|
+
- head
|
21
|
+
|
22
|
+
runs-on: ${{ matrix.os }}-latest
|
23
|
+
|
24
|
+
env:
|
25
|
+
TEST_CHECKS: 100
|
26
|
+
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@v2
|
29
|
+
- name: Set up Ruby
|
30
|
+
uses: ruby/setup-ruby@v1
|
31
|
+
with:
|
32
|
+
ruby-version: ${{ matrix.ruby }}
|
33
|
+
bundler-cache: true
|
34
|
+
- name: Initialize Git Submodules
|
35
|
+
run: git submodule update --init --recursive
|
36
|
+
- name: Build Argon2 C library
|
37
|
+
run: bin/setup
|
38
|
+
- name: Test Argon2 C library
|
39
|
+
run: bin/test
|
40
|
+
- name: Run tests
|
41
|
+
run: bundle exec rake test
|
42
|
+
|
43
|
+
rubocop:
|
44
|
+
|
45
|
+
runs-on: ubuntu-latest
|
46
|
+
|
47
|
+
steps:
|
48
|
+
- uses: actions/checkout@v2
|
49
|
+
- name: Set up Ruby
|
50
|
+
uses: ruby/setup-ruby@v1
|
51
|
+
with:
|
52
|
+
ruby-version: 3.0
|
53
|
+
bundler-cache: true
|
54
|
+
- name: Run rubocop
|
55
|
+
run: bundle exec rake rubocop
|
56
|
+
|
57
|
+
# TODO: Add code coverage testing (coveralls)
|
58
|
+
# TODO: Add documentation/maintainability testing?
|
59
|
+
# TODO: Add dependency testing? (bundle audit)
|
60
|
+
|
61
|
+
finish:
|
62
|
+
runs-on: ubuntu-latest
|
63
|
+
needs: [ test_matrix, rubocop ]
|
64
|
+
steps:
|
65
|
+
- name: Wait for status checks
|
66
|
+
run: echo "All Green!"
|
data/.gitignore
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
# TODO: This is just the default .gitignore, should probably be fine-tuned
|
2
|
+
|
3
|
+
*.gem
|
4
|
+
*.rbc
|
5
|
+
/.config
|
6
|
+
/coverage/
|
7
|
+
/InstalledFiles
|
8
|
+
/pkg/
|
9
|
+
/spec/reports/
|
10
|
+
/spec/examples.txt
|
11
|
+
/test/tmp/
|
12
|
+
/test/version_tmp/
|
13
|
+
/tmp/
|
14
|
+
|
15
|
+
# Generated by the DummyApp when running rspec
|
16
|
+
/spec/dummy_app/log/
|
17
|
+
/spec/dummy_app/tmp/
|
18
|
+
*.sqlite3
|
19
|
+
|
20
|
+
# Used by dotenv library to load environment variables.
|
21
|
+
# .env
|
22
|
+
|
23
|
+
# Ignore Byebug command history file.
|
24
|
+
.byebug_history
|
25
|
+
|
26
|
+
## Specific to RubyMotion:
|
27
|
+
.dat*
|
28
|
+
.repl_history
|
29
|
+
build/
|
30
|
+
*.bridgesupport
|
31
|
+
build-iPhoneOS/
|
32
|
+
build-iPhoneSimulator/
|
33
|
+
|
34
|
+
## Specific to RubyMotion (use of CocoaPods):
|
35
|
+
#
|
36
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
37
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
38
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
39
|
+
#
|
40
|
+
# vendor/Pods/
|
41
|
+
|
42
|
+
## Documentation cache and generated files:
|
43
|
+
/.yardoc/
|
44
|
+
/_yardoc/
|
45
|
+
/doc/
|
46
|
+
/rdoc/
|
47
|
+
|
48
|
+
## Environment normalization:
|
49
|
+
/.bundle/
|
50
|
+
/vendor/bundle
|
51
|
+
/lib/bundler/man/
|
52
|
+
|
53
|
+
# for a library or gem, you might want to ignore these files since the code is
|
54
|
+
# intended to run in multiple environments; otherwise, check them in:
|
55
|
+
Gemfile.lock
|
56
|
+
.ruby-version
|
57
|
+
.ruby-gemset
|
58
|
+
|
59
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
60
|
+
.rvmrc
|
61
|
+
|
62
|
+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
63
|
+
# .rubocop-https?--*
|
64
|
+
|
65
|
+
# Copied from the Technion .gitignore
|
66
|
+
/ext/argon2_wrap/libargon2_wrap.so
|
67
|
+
/ext/argon2_wrap/tests
|
68
|
+
/ext/argon2_wrap/libargon2_wrap.bundle*
|
data/.gitmodules
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,208 @@
|
|
1
|
+
Metrics/AbcSize:
|
2
|
+
Max: 20
|
3
|
+
|
4
|
+
Metrics/CyclomaticComplexity:
|
5
|
+
Enabled: false
|
6
|
+
|
7
|
+
Metrics/PerceivedComplexity:
|
8
|
+
Enabled: false
|
9
|
+
|
10
|
+
Layout/LineLength:
|
11
|
+
Max: 160
|
12
|
+
Exclude:
|
13
|
+
- 'test/low_level_test.rb'
|
14
|
+
|
15
|
+
Metrics/MethodLength:
|
16
|
+
Max: 24
|
17
|
+
Exclude:
|
18
|
+
- 'test/low_level_test.rb'
|
19
|
+
|
20
|
+
Layout/ParameterAlignment:
|
21
|
+
Enabled: false
|
22
|
+
|
23
|
+
Layout/ArrayAlignment:
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
# Configuration parameters: Exclude.
|
27
|
+
Style/Documentation:
|
28
|
+
Exclude:
|
29
|
+
- 'spec/**/*'
|
30
|
+
- 'test/**/*'
|
31
|
+
|
32
|
+
# Offense count: 16
|
33
|
+
# Cop supports --auto-correct.
|
34
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
35
|
+
Layout/FirstParameterIndentation:
|
36
|
+
Exclude:
|
37
|
+
- 'lib/argon2.rb'
|
38
|
+
- 'test/low_level_test.rb'
|
39
|
+
- 'test/util_test.rb'
|
40
|
+
|
41
|
+
Style/HashSyntax:
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
# Offense count: 1
|
45
|
+
# Cop supports --auto-correct.
|
46
|
+
Layout/FirstArrayElementIndentation:
|
47
|
+
Exclude:
|
48
|
+
- 'lib/argon2/errors.rb'
|
49
|
+
|
50
|
+
# Offense count: 44
|
51
|
+
# Cop supports --auto-correct.
|
52
|
+
Layout/LeadingCommentSpace:
|
53
|
+
Exclude:
|
54
|
+
- 'ext/argon2_wrap/extconf.rb'
|
55
|
+
|
56
|
+
Style/SignalException:
|
57
|
+
Enabled: false
|
58
|
+
|
59
|
+
Style/StringLiterals:
|
60
|
+
Enabled: false
|
61
|
+
|
62
|
+
Style/WordArray:
|
63
|
+
MinSize: 33
|
64
|
+
|
65
|
+
Layout/MultilineMethodCallBraceLayout:
|
66
|
+
Exclude:
|
67
|
+
- 'lib/argon2.rb'
|
68
|
+
- 'test/low_level_test.rb'
|
69
|
+
|
70
|
+
Gemspec/RequiredRubyVersion:
|
71
|
+
Enabled: false
|
72
|
+
|
73
|
+
Layout/BeginEndAlignment: # (new in 0.91)
|
74
|
+
Enabled: true
|
75
|
+
Layout/EmptyLinesAroundAttributeAccessor: # (new in 0.83)
|
76
|
+
Enabled: true
|
77
|
+
Layout/SpaceAroundMethodCallOperator: # (new in 0.82)
|
78
|
+
Enabled: true
|
79
|
+
Lint/BinaryOperatorWithIdenticalOperands: # (new in 0.89)
|
80
|
+
Enabled: true
|
81
|
+
Lint/ConstantDefinitionInBlock: # (new in 0.91)
|
82
|
+
Enabled: true
|
83
|
+
Lint/DeprecatedOpenSSLConstant: # (new in 0.84)
|
84
|
+
Enabled: true
|
85
|
+
Lint/DuplicateElsifCondition: # (new in 0.88)
|
86
|
+
Enabled: true
|
87
|
+
Lint/DuplicateRequire: # (new in 0.90)
|
88
|
+
Enabled: true
|
89
|
+
Lint/DuplicateRescueException: # (new in 0.89)
|
90
|
+
Enabled: true
|
91
|
+
Lint/EmptyConditionalBody: # (new in 0.89)
|
92
|
+
Enabled: true
|
93
|
+
Lint/EmptyFile: # (new in 0.90)
|
94
|
+
Enabled: true
|
95
|
+
Lint/FloatComparison: # (new in 0.89)
|
96
|
+
Enabled: true
|
97
|
+
Lint/IdentityComparison: # (new in 0.91)
|
98
|
+
Enabled: true
|
99
|
+
Lint/MissingSuper: # (new in 0.89)
|
100
|
+
Enabled: true
|
101
|
+
Lint/MixedRegexpCaptureTypes: # (new in 0.85)
|
102
|
+
Enabled: true
|
103
|
+
Lint/OutOfRangeRegexpRef: # (new in 0.89)
|
104
|
+
Enabled: true
|
105
|
+
Lint/RaiseException: # (new in 0.81)
|
106
|
+
Enabled: true
|
107
|
+
Lint/SelfAssignment: # (new in 0.89)
|
108
|
+
Enabled: true
|
109
|
+
Lint/StructNewOverride: # (new in 0.81)
|
110
|
+
Enabled: true
|
111
|
+
Lint/TopLevelReturnWithArgument: # (new in 0.89)
|
112
|
+
Enabled: true
|
113
|
+
Lint/TrailingCommaInAttributeDeclaration: # (new in 0.90)
|
114
|
+
Enabled: true
|
115
|
+
Lint/UnreachableLoop: # (new in 0.89)
|
116
|
+
Enabled: true
|
117
|
+
Lint/UselessMethodDefinition: # (new in 0.90)
|
118
|
+
Enabled: true
|
119
|
+
Lint/UselessTimes: # (new in 0.91)
|
120
|
+
Enabled: true
|
121
|
+
Style/AccessorGrouping: # (new in 0.87)
|
122
|
+
Enabled: true
|
123
|
+
Style/ArrayCoercion: # (new in 0.88)
|
124
|
+
Enabled: true
|
125
|
+
Style/BisectedAttrAccessor: # (new in 0.87)
|
126
|
+
Enabled: true
|
127
|
+
Style/CaseLikeIf: # (new in 0.88)
|
128
|
+
Enabled: true
|
129
|
+
Style/CombinableLoops: # (new in 0.90)
|
130
|
+
Enabled: true
|
131
|
+
Style/ExplicitBlockArgument: # (new in 0.89)
|
132
|
+
Enabled: true
|
133
|
+
Style/ExponentialNotation: # (new in 0.82)
|
134
|
+
Enabled: true
|
135
|
+
Style/GlobalStdStream: # (new in 0.89)
|
136
|
+
Enabled: true
|
137
|
+
Style/HashAsLastArrayItem: # (new in 0.88)
|
138
|
+
Enabled: true
|
139
|
+
Style/HashEachMethods: # (new in 0.80)
|
140
|
+
Enabled: true
|
141
|
+
Style/HashLikeCase: # (new in 0.88)
|
142
|
+
Enabled: true
|
143
|
+
Style/HashTransformKeys: # (new in 0.80)
|
144
|
+
Enabled: true
|
145
|
+
Style/HashTransformValues: # (new in 0.80)
|
146
|
+
Enabled: true
|
147
|
+
Style/KeywordParametersOrder: # (new in 0.90)
|
148
|
+
Enabled: true
|
149
|
+
Style/OptionalBooleanParameter: # (new in 0.89)
|
150
|
+
Enabled: true
|
151
|
+
Style/RedundantAssignment: # (new in 0.87)
|
152
|
+
Enabled: true
|
153
|
+
Style/RedundantFetchBlock: # (new in 0.86)
|
154
|
+
Enabled: true
|
155
|
+
Style/RedundantFileExtensionInRequire: # (new in 0.88)
|
156
|
+
Enabled: true
|
157
|
+
Style/RedundantRegexpCharacterClass: # (new in 0.85)
|
158
|
+
Enabled: true
|
159
|
+
Style/RedundantRegexpEscape: # (new in 0.85)
|
160
|
+
Enabled: true
|
161
|
+
Style/RedundantSelfAssignment: # (new in 0.90)
|
162
|
+
Enabled: true
|
163
|
+
Style/SingleArgumentDig: # (new in 0.89)
|
164
|
+
Enabled: true
|
165
|
+
Style/SlicingWithRange: # (new in 0.83)
|
166
|
+
Enabled: true
|
167
|
+
Style/SoleNestedConditional: # (new in 0.89)
|
168
|
+
Enabled: true
|
169
|
+
Style/StringConcatenation: # (new in 0.89)
|
170
|
+
Enabled: true
|
171
|
+
|
172
|
+
Layout/SpaceBeforeBrackets: # (new in 1.7)
|
173
|
+
Enabled: true
|
174
|
+
Lint/AmbiguousAssignment: # (new in 1.7)
|
175
|
+
Enabled: true
|
176
|
+
Lint/DuplicateBranch: # (new in 1.3)
|
177
|
+
Enabled: true
|
178
|
+
Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
|
179
|
+
Enabled: true
|
180
|
+
Lint/EmptyBlock: # (new in 1.1)
|
181
|
+
Enabled: true
|
182
|
+
Lint/EmptyClass: # (new in 1.3)
|
183
|
+
Enabled: true
|
184
|
+
Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
|
185
|
+
Enabled: true
|
186
|
+
Lint/ToEnumArguments: # (new in 1.1)
|
187
|
+
Enabled: true
|
188
|
+
Lint/UnexpectedBlockArity: # (new in 1.5)
|
189
|
+
Enabled: true
|
190
|
+
Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
|
191
|
+
Enabled: true
|
192
|
+
Style/ArgumentsForwarding: # (new in 1.1)
|
193
|
+
Enabled: true
|
194
|
+
Style/CollectionCompact: # (new in 1.2)
|
195
|
+
Enabled: true
|
196
|
+
Style/DocumentDynamicEvalDefinition: # (new in 1.1)
|
197
|
+
Enabled: true
|
198
|
+
Style/HashExcept: # (new in 1.7)
|
199
|
+
Enabled: true
|
200
|
+
Style/NegatedIfElseCondition: # (new in 1.2)
|
201
|
+
Enabled: true
|
202
|
+
Style/NilLambda: # (new in 1.3)
|
203
|
+
Enabled: true
|
204
|
+
Style/RedundantArgument: # (new in 1.4)
|
205
|
+
Enabled: true
|
206
|
+
Style/SwapValues: # (new in 1.1)
|
207
|
+
Enabled: true
|
208
|
+
|