sha3 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sha3 might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 4eb74d4c4626be8751f643664a1820c0227a88dd
4
- data.tar.gz: bb6c33da2459890eeb083874e209cbf75b3ca83e
2
+ SHA256:
3
+ metadata.gz: a4ff3a34d0d9bce72c2ccbfb6a8ad81d9107f538ad2635cab15274c8661dcb71
4
+ data.tar.gz: 8fdab8312082afb9783faf1f9ec2136c5e8812a482fc1a6f0afded96cc9d64a8
5
5
  SHA512:
6
- metadata.gz: ed137cc7d02d2c376b256c96f55bd430305fead1d00942cc251f7027c9651d08877b1a31372c9822cb8daf5fcebae689683b59c216d5bf3ffe413e179a5258cb
7
- data.tar.gz: 1446633b9181a36ed9b0fa04a3d2a7593add059fbe473a496ad35b9c0837da9dd690b167d8bb2d2ea036b6dca60f83b644e8e0719e728d8883aa72064ed8a32d
6
+ metadata.gz: e7a38d0f89905ad6f90fdcc4a29ad245aa5f82edfed8b227485623ad05bb591c9cf5493e93c9a93119197b801ef68217c5d165b61a27c9a66ad175343ab89f1e
7
+ data.tar.gz: 497c72e85ad814301adbb4f71c11f53e1434b9b660e70847eb0939bf30faa883d73215740cd425048978b9c1e71c8f2917eed1819a5ed15b12e74076253190a0
data/.gitignore CHANGED
@@ -1,24 +1,234 @@
1
+
2
+ # Created by https://www.toptal.com/developers/gitignore/api/c,clion,visualstudiocode,ruby
3
+ # Edit at https://www.toptal.com/developers/gitignore?templates=c,clion,visualstudiocode,ruby
4
+
5
+ ### C ###
6
+ # Prerequisites
7
+ *.d
8
+
9
+ # Object files
10
+ *.o
11
+ *.ko
12
+ *.obj
13
+ *.elf
14
+
15
+ # Linker output
16
+ *.ilk
17
+ *.map
18
+ *.exp
19
+
20
+ # Precompiled Headers
21
+ *.gch
22
+ *.pch
23
+
24
+ # Libraries
25
+ *.lib
26
+ *.a
27
+ *.la
28
+ *.lo
29
+
30
+ # Shared objects (inc. Windows DLLs)
31
+ *.dll
32
+ *.so
33
+ *.so.*
34
+ *.dylib
35
+
36
+ # Executables
37
+ *.exe
38
+ *.out
39
+ *.app
40
+ *.i*86
41
+ *.x86_64
42
+ *.hex
43
+
44
+ # Debug files
45
+ *.dSYM/
46
+ *.su
47
+ *.idb
48
+ *.pdb
49
+
50
+ # Kernel Module Compile Results
51
+ *.mod*
52
+ *.cmd
53
+ .tmp_versions/
54
+ modules.order
55
+ Module.symvers
56
+ Mkfile.old
57
+ dkms.conf
58
+
59
+ ### CLion ###
60
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
61
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
62
+
63
+ # User-specific stuff
64
+ .idea/**/workspace.xml
65
+ .idea/**/tasks.xml
66
+ .idea/**/usage.statistics.xml
67
+ .idea/**/dictionaries
68
+ .idea/**/shelf
69
+
70
+ # Generated files
71
+ .idea/**/contentModel.xml
72
+
73
+ # Sensitive or high-churn files
74
+ .idea/**/dataSources/
75
+ .idea/**/dataSources.ids
76
+ .idea/**/dataSources.local.xml
77
+ .idea/**/sqlDataSources.xml
78
+ .idea/**/dynamic.xml
79
+ .idea/**/uiDesigner.xml
80
+ .idea/**/dbnavigator.xml
81
+
82
+ # Gradle
83
+ .idea/**/gradle.xml
84
+ .idea/**/libraries
85
+
86
+ # Gradle and Maven with auto-import
87
+ # When using Gradle or Maven with auto-import, you should exclude module files,
88
+ # since they will be recreated, and may cause churn. Uncomment if using
89
+ # auto-import.
90
+ # .idea/artifacts
91
+ # .idea/compiler.xml
92
+ # .idea/jarRepositories.xml
93
+ # .idea/modules.xml
94
+ # .idea/*.iml
95
+ # .idea/modules
96
+ # *.iml
97
+ # *.ipr
98
+
99
+ # CMake
100
+ cmake-build-*/
101
+
102
+ # Mongo Explorer plugin
103
+ .idea/**/mongoSettings.xml
104
+
105
+ # File-based project format
106
+ *.iws
107
+
108
+ # IntelliJ
109
+ out/
110
+
111
+ # mpeltonen/sbt-idea plugin
112
+ .idea_modules/
113
+
114
+ # JIRA plugin
115
+ atlassian-ide-plugin.xml
116
+
117
+ # Cursive Clojure plugin
118
+ .idea/replstate.xml
119
+
120
+ # Crashlytics plugin (for Android Studio and IntelliJ)
121
+ com_crashlytics_export_strings.xml
122
+ crashlytics.properties
123
+ crashlytics-build.properties
124
+ fabric.properties
125
+
126
+ # Editor-based Rest Client
127
+ .idea/httpRequests
128
+
129
+ # Android studio 3.1+ serialized cache file
130
+ .idea/caches/build_file_checksums.ser
131
+
132
+ ### CLion Patch ###
133
+ # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
134
+
135
+ # *.iml
136
+ # modules.xml
137
+ # .idea/misc.xml
138
+ # *.ipr
139
+
140
+ # Sonarlint plugin
141
+ # https://plugins.jetbrains.com/plugin/7973-sonarlint
142
+ .idea/**/sonarlint/
143
+
144
+ # SonarQube Plugin
145
+ # https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
146
+ .idea/**/sonarIssues.xml
147
+
148
+ # Markdown Navigator plugin
149
+ # https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
150
+ .idea/**/markdown-navigator.xml
151
+ .idea/**/markdown-navigator-enh.xml
152
+ .idea/**/markdown-navigator/
153
+
154
+ # Cache file creation bug
155
+ # See https://youtrack.jetbrains.com/issue/JBR-2257
156
+ .idea/$CACHE_FILE$
157
+
158
+ # CodeStream plugin
159
+ # https://plugins.jetbrains.com/plugin/12206-codestream
160
+ .idea/codestream.xml
161
+
162
+ ### Ruby ###
1
163
  *.gem
2
164
  *.rbc
3
- *.rbx
4
- *.bundle
5
- *.so
6
- *.dll
7
- .config
8
- coverage
9
- InstalledFiles
10
- lib/bundler/man
11
- pkg
12
- rdoc
13
- spec/reports
14
- test/tmp
15
- test/version_tmp
16
- tmp
17
-
18
- # YARD artifacts
19
- .yardoc
20
- _yardoc
21
- doc/
22
- Gemfile.lock
23
-
24
- .idea/
165
+ /.config
166
+ /coverage/
167
+ /InstalledFiles
168
+ /pkg/
169
+ /spec/reports/
170
+ /spec/examples.txt
171
+ /test/tmp/
172
+ /test/version_tmp/
173
+ /tmp/
174
+
175
+ # Used by dotenv library to load environment variables.
176
+ # .env
177
+
178
+ # Ignore Byebug command history file.
179
+ .byebug_history
180
+
181
+ ## Specific to RubyMotion:
182
+ .dat*
183
+ .repl_history
184
+ build/
185
+ *.bridgesupport
186
+ build-iPhoneOS/
187
+ build-iPhoneSimulator/
188
+
189
+ ## Specific to RubyMotion (use of CocoaPods):
190
+ #
191
+ # We recommend against adding the Pods directory to your .gitignore. However
192
+ # you should judge for yourself, the pros and cons are mentioned at:
193
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
194
+ # vendor/Pods/
195
+
196
+ ## Documentation cache and generated files:
197
+ /.yardoc/
198
+ /_yardoc/
199
+ /doc/
200
+ /rdoc/
201
+
202
+ ## Environment normalization:
203
+ /.bundle/
204
+ /vendor/bundle
205
+ /lib/bundler/man/
206
+
207
+ # for a library or gem, you might want to ignore these files since the code is
208
+ # intended to run in multiple environments; otherwise, check them in:
209
+ # Gemfile.lock
210
+ # .ruby-version
211
+ # .ruby-gemset
212
+
213
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
214
+ .rvmrc
215
+
216
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
217
+ # .rubocop-https?--*
218
+
219
+ ### Ruby Patch ###
220
+ # Used by RuboCop. Remote config files pulled in from inherit_from directive.
221
+ # .rubocop-https?--*
222
+
223
+ ### VisualStudioCode ###
224
+ .vscode/*
225
+ !.vscode/tasks.json
226
+ !.vscode/launch.json
227
+ *.code-workspace
228
+
229
+ ### VisualStudioCode Patch ###
230
+ # Ignore all local history of files
231
+ .history
232
+ .ionide
233
+
234
+ # End of https://www.toptal.com/developers/gitignore/api/c,clion,visualstudiocode,ruby
@@ -1,23 +1,24 @@
1
- language: ruby
2
- rvm:
3
- - ruby-head
4
- - 2.1.0
5
- - 2.0.0
6
- - 1.9.3
7
- - 1.9.2
8
- - 1.8.7
9
- - rbx-2
10
-
11
- gemfile: Gemfile.ci
1
+ arch:
2
+ - amd64
3
+ - arm64
12
4
 
13
5
  branches:
14
6
  only:
15
7
  - master
8
+ - develop
9
+
10
+ gemfile: Gemfile.ci
11
+
12
+ language: ruby
16
13
 
17
14
  os:
18
15
  - linux
19
- - osx
20
16
 
21
- matrix:
22
- allow_failures:
23
- - os: osx
17
+ rvm:
18
+ - ruby-head
19
+ - 2.7
20
+ - 2.6
21
+ - 2.5
22
+ - 2.4
23
+ - 2.3
24
+ - 2.2
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source "http://rubygems.org"
1
+ source 'http://rubygems.org'
2
2
 
3
3
  gemspec
data/Gemfile.ci CHANGED
@@ -1,14 +1,8 @@
1
- source "http://rubygems.org"
1
+ source 'http://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rubygems-tasks'
6
5
  gem 'rake'
7
- gem 'rspec', '~> 3.3'
6
+ gem 'rspec'
7
+ gem 'rubygems-tasks'
8
8
  gem 'yard'
9
-
10
- platforms :rbx do
11
- gem 'racc'
12
- gem 'rubysl', '~> 2.0'
13
- gem 'psych'
14
- end
data/README.md CHANGED
@@ -1,17 +1,17 @@
1
1
  # sha3
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/sha3.svg)](https://badge.fury.io/rb/sha3) [![CI](https://secure.travis-ci.org/johanns/sha3.png)](https://secure.travis-ci.org/johanns/sha3) [![Dependencies](https://gemnasium.com/johanns/sha3.png)](https://gemnasium.com/johanns/sha3) [![CodeClimate](https://codeclimate.com/github/johanns/sha3.png)](https://codeclimate.com/github/johanns/sha3)
3
+ [![Gem Version](https://badge.fury.io/rb/sha3.svg)](https://badge.fury.io/rb/sha3) [![CI](https://secure.travis-ci.org/johanns/sha3.png)](https://secure.travis-ci.org/johanns/sha3) [![CodeClimate](https://codeclimate.com/github/johanns/sha3.png)](https://codeclimate.com/github/johanns/sha3)
4
4
 
5
5
  **SHA3 for Ruby** is a native (C) binding to SHA3 (Keccak FIPS 202) cryptographic hashing algorithm.
6
6
 
7
- - Home :: [https://github.com/johanns/sha3#readme]()
8
- - Issues :: [https://github.com/johanns/sha3/issues]()
9
- - Documentation :: [http://rubydoc.info/gems/sha3/frames]()
7
+ - [Home](https://github.com/johanns/sha3#readme)
8
+ - [Issues](https://github.com/johanns/sha3/issues)
9
+ - [Documentation](http://rubydoc.info/gems/sha3/frames)
10
10
 
11
11
  ## Warnings
12
12
 
13
- - Version 1.0+ breaks compatibility with previous versions of this gem.
14
- - Do NOT use SHA3 to hash passwords; use either ```bcrypt``` or ```scrypt``` instead!
13
+ - Please do NOT use SHA3 to hash passwords -- use a slow hashing function instead (e.g.: `pbkdf2`, `argon2`, `bcrypt` or `scrypt`)
14
+ - Version 1.0 introduces new API and is incompatible with previous versions (0.x).
15
15
 
16
16
  ## Module details
17
17
 
@@ -97,7 +97,7 @@ s = SHA3::Digest.file("tests.sh")
97
97
  * Native build tools (e.g., GCC, Minigw, etc.)
98
98
  * Gems: rubygems-tasks, rake, rspec, yard
99
99
 
100
- ### Testing + RSpec
100
+ ### Testing
101
101
 
102
102
  Call ```rake``` to run the included RSpec tests.
103
103
 
@@ -107,39 +107,14 @@ Only a small subset of test vectors are included in the source repository; howev
107
107
 
108
108
  ### Rubies
109
109
 
110
- Tested with Rubies:
110
+ Supported Ruby versions:
111
111
 
112
- - MRI Ruby-Head
113
- - MRI 2.1.0
114
- - MRI 2.0.0
115
- - MRI 1.9.3
116
- - MRI 1.9.2
117
- - MRI 1.8.7
118
- - Rubinius 2
112
+ - MRI Ruby 2.4 - 3.0
119
113
 
120
- On:
121
114
 
122
- - Ubuntu 12.04, 12.10, 13.04, 14.04, 15.04
123
- - Windows 7, 8, 8.1, 10
124
- - Mac OS X 10.6 - 10.11
125
-
126
- ## Releases
127
-
128
- - *1.0.1* :: FIPS 202 compliance (breaks compatibility with earlier releases)
129
- - *0.2.6* :: Fixed bug #4
130
- - *0.2.5* :: Bug fixes. (See ChangeLog.rdoc)
131
- - *0.2.4* :: Bug fixes. (YANKED)
132
- - *0.2.3* :: Added documentation file (decoupled form C source); refactored C source.
133
- - *0.2.2* :: Added sub-class for each SHA3 supported bit-lengths (example: SHA3::Digest::SHA256). Minor bug fix.
134
- - *0.2.0* :: Production worthy, but breaks API compatibility with 0.1.x. Backward-compatibility will be maintained henceforth.
135
- - *0.1.x* :: Alpha code, and not suitable for production.
136
-
137
- ## TO DO
138
-
139
- - Add SHAKE128/256 support
140
115
 
141
116
  ## Copyright
142
117
 
143
- Copyright (c) 2012 - 2015 Johanns Gregorian (https://github.com/johanns)
118
+ Copyright (c) 2012 - 2020 Johanns Gregorian (https://github.com/johanns)
144
119
 
145
120
  **See LICENSE.txt for details.**
data/Rakefile CHANGED
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  require 'rubygems'
4
2
  require 'rake'
5
3
 
@@ -10,34 +8,34 @@ begin
10
8
  Gem::Tasks.new
11
9
  rescue LoadError => e
12
10
  warn e.message
13
- warn "Run `gem install rubygems-tasks` to install Gem::Tasks."
11
+ warn 'Run `gem install rubygems-tasks` to install Gem::Tasks.'
14
12
  end
15
13
 
16
14
  begin
17
- gem 'rspec', '~> 3.3'
15
+ gem 'rspec'
18
16
  require 'rspec/core/rake_task'
19
17
 
20
18
  RSpec::Core::RakeTask.new
21
- rescue LoadError => e
19
+ rescue LoadError
22
20
  task :spec do
23
- abort "Please run `gem install rspec` to install RSpec."
21
+ abort 'Please run `gem install rspec` to install RSpec.'
24
22
  end
25
23
  end
26
24
 
27
- task :test => :spec
28
- task :default => [:compile, :spec]
25
+ task test: :spec
26
+ task default: %i[compile spec]
29
27
 
30
28
  begin
31
29
  gem 'yard'
32
30
  require 'yard'
33
31
 
34
32
  YARD::Rake::YardocTask.new
35
- rescue LoadError => e
33
+ rescue LoadError
36
34
  task :yard do
37
- abort "Please run `gem install yard` to install YARD."
35
+ abort 'Please run `gem install yard` to install YARD.'
38
36
  end
39
37
  end
40
- task :doc => :yard
38
+ task doc: :yard
41
39
 
42
40
  begin
43
41
  gem 'rake-compiler'
@@ -47,10 +45,10 @@ begin
47
45
  ext.name = 'sha3_n'
48
46
  ext.ext_dir = 'ext/sha3'
49
47
  ext.tmp_dir = 'tmp'
50
- ext.source_pattern = "*.{c}"
48
+ ext.source_pattern = '*.{c}'
51
49
  end
52
- rescue LoadError => e
50
+ rescue LoadError
53
51
  task :compile do
54
- abort "Please run `gem install rake-compiler` to install Rake-Compiler."
52
+ abort 'Please run `gem install rake-compiler` to install Rake-Compiler.'
55
53
  end
56
54
  end