digest-blake2b 0.0.1 → 0.0.2
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 +4 -4
- data/.gitignore +2 -1
- data/Gemfile +0 -0
- data/LICENSE +0 -0
- data/README.md +17 -17
- data/Rakefile +0 -0
- data/digest-blake2b.gemspec +5 -4
- data/ext/digest/blake2b_ext/blake2-impl.h +0 -0
- data/ext/digest/blake2b_ext/blake2.h +0 -0
- data/ext/digest/blake2b_ext/extconf.rb +0 -0
- data/ext/digest/blake2b_ext/rbext.c +0 -0
- data/lib/digest/blake2b/key.rb +0 -0
- data/lib/digest/blake2b/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6bb43dc304a2148c476e19f9b2b1dcef84340dbe28316c26980ff061f427db4c
|
4
|
+
data.tar.gz: b9109fc3c671f658ea8d0d4084327e0c4ca4da427607b844370bf79622234461
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9afed341a55d34509be93f5d106f1b214eeadf76edf9d852c1919cdc5899df1f95d1ae35d26157f9133cd7fbffd1228c6467c243e3485d8ec8c16b3f63646542
|
7
|
+
data.tar.gz: 639d7640182c611a7183f6b14bdae714c5a2c158251b977ffc73138e0d50d9968abe5717c8c42f741e4b96ca808163a1137fa62f7673c402cfda615795621881
|
data/.gitignore
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files
|
1
|
+
# See https://help.github.com/articles/ignoring-files
|
2
|
+
# for more about ignoring files.
|
2
3
|
#
|
3
4
|
# If you find yourself ignoring temporary files generated by your text editor
|
4
5
|
# or operating system, you probably want to add a global ignore instead:
|
data/Gemfile
CHANGED
File without changes
|
data/LICENSE
CHANGED
File without changes
|
data/README.md
CHANGED
@@ -14,23 +14,23 @@ The C code for this gem is taken from the [official reference C implementation](
|
|
14
14
|
## Install
|
15
15
|
|
16
16
|
```
|
17
|
-
gem install blake2b
|
17
|
+
gem install digest-blake2b
|
18
18
|
```
|
19
19
|
|
20
20
|
## Usage
|
21
21
|
|
22
22
|
``` ruby
|
23
|
-
require 'blake2b'
|
23
|
+
require 'digest/blake2b'
|
24
24
|
|
25
25
|
# The UTF-8 String (Required) that you want to digest.
|
26
26
|
input = 'abc'
|
27
27
|
|
28
28
|
# The main application of keyed BLAKE2 is as a message authentication code (MAC)
|
29
|
-
# By default `Blake2b::Key.none` is used.
|
30
|
-
key = Blake2b::Key.none
|
31
|
-
# key = Blake2b::Key.from_string("foo bar baz")
|
32
|
-
# key = Blake2b::Key.from_hex('DEADBEAF')
|
33
|
-
# key = Blake2b::Key.from_bytes([222, 173, 190, 175])
|
29
|
+
# By default `Digest::Blake2b::Key.none` is used.
|
30
|
+
key = Digest::Blake2b::Key.none
|
31
|
+
# key = Digest::Blake2b::Key.from_string("foo bar baz")
|
32
|
+
# key = Digest::Blake2b::Key.from_hex('DEADBEAF')
|
33
|
+
# key = Digest::Blake2b::Key.from_bytes([222, 173, 190, 175])
|
34
34
|
|
35
35
|
# The output length in Bytes of the Hash, Max and Default is 32.
|
36
36
|
out_len = 32
|
@@ -38,32 +38,32 @@ out_len = 32
|
|
38
38
|
# HEX OUTPUT
|
39
39
|
############
|
40
40
|
|
41
|
-
Blake2b.hex(input)
|
41
|
+
Digest::Blake2b.hex(input)
|
42
42
|
=> "508c5e8c327c14e2e1a72ba34eeb452f37458b209ed63a294d999b4c86675982"
|
43
43
|
|
44
|
-
Blake2b.hex(input, key)
|
44
|
+
Digest::Blake2b.hex(input, key)
|
45
45
|
=> "508c5e8c327c14e2e1a72ba34eeb452f37458b209ed63a294d999b4c86675982"
|
46
46
|
|
47
|
-
Blake2b.hex(input, key, out_len)
|
47
|
+
Digest::Blake2b.hex(input, key, out_len)
|
48
48
|
=> "508c5e8c327c14e2e1a72ba34eeb452f37458b209ed63a294d999b4c86675982"
|
49
49
|
|
50
50
|
# BYTES OUTPUT
|
51
51
|
##############
|
52
52
|
|
53
|
-
Blake2b.bytes(input)
|
53
|
+
Digest::Blake2b.bytes(input)
|
54
54
|
=> [80, 140, 94, ...]
|
55
55
|
|
56
|
-
Blake2b.bytes(input, key)
|
56
|
+
Digest::Blake2b.bytes(input, key)
|
57
57
|
=> [80, 140, 94, ...]
|
58
58
|
|
59
|
-
Blake2b.bytes(input, key, out_len)
|
59
|
+
Digest::Blake2b.bytes(input, key, out_len)
|
60
60
|
=> [80, 140, 94, ...]
|
61
61
|
|
62
62
|
```
|
63
63
|
|
64
64
|
## Performance
|
65
65
|
|
66
|
-
`Blake2b` really shines on larger inputs. Here are some benchmarks on various input sizes. You can find the performance suite used for these benchmarks at `performance/performance_suite.rb`. All tests were run on an iMac 27" Late 2014, 4GHz Core i7 CPU (4790K) w/ SSE4.1 + SSE4.2, 32GB DDR3 RAM.
|
66
|
+
`Digest::Blake2b` really shines on larger inputs. Here are some benchmarks on various input sizes. You can find the performance suite used for these benchmarks at `performance/performance_suite.rb`. All tests were run on an iMac 27" Late 2014, 4GHz Core i7 CPU (4790K) w/ SSE4.1 + SSE4.2, 32GB DDR3 RAM.
|
67
67
|
|
68
68
|
### 1KB (1M digests)
|
69
69
|
|
@@ -108,8 +108,8 @@ Hopefully this gem will not be required once Ruby [issue #12802](https://bugs.ru
|
|
108
108
|
|
109
109
|
## License
|
110
110
|
|
111
|
-
Blake2b is based heavily on [Blake2](https://github.com/franckverrot/blake2) by Franck Verrot, Copyright 2014.
|
111
|
+
Digest::Blake2b is based heavily on [Blake2](https://github.com/franckverrot/blake2) by Franck Verrot, Copyright 2014.
|
112
112
|
|
113
|
-
Blake2b is copyright 2018, Mauricio Gomes.
|
113
|
+
Digest::Blake2b is copyright 2018, Mauricio Gomes.
|
114
114
|
|
115
|
-
The original work (Blake2) and the modified work (Blake2b) are licensed GPL v3.0. See LICENSE for details.
|
115
|
+
The original work (Blake2) and the modified work (Digest::Blake2b) are licensed GPL v3.0. See LICENSE for details.
|
data/Rakefile
CHANGED
File without changes
|
data/digest-blake2b.gemspec
CHANGED
@@ -9,8 +9,9 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.name = 'digest-blake2b'
|
10
10
|
spec.version = Digest::Blake2b::VERSION
|
11
11
|
spec.license = 'GPL-3.0'
|
12
|
-
spec.homepage = 'https://github.com/kotovalexarian/digest-blake2b
|
12
|
+
spec.homepage = 'https://github.com/kotovalexarian/digest-blake2b'
|
13
13
|
spec.summary = 'The BLAKE2b cryptographic hash function.'
|
14
|
+
spec.platform = Gem::Platform::RUBY
|
14
15
|
|
15
16
|
spec.required_ruby_version = '~> 2.1'
|
16
17
|
|
@@ -23,10 +24,10 @@ Gem::Specification.new do |spec|
|
|
23
24
|
DESCRIPTION
|
24
25
|
|
25
26
|
spec.metadata = {
|
26
|
-
'homepage_uri' => 'https://github.com/kotovalexarian/digest-blake2b
|
27
|
-
'source_code_uri' => 'https://github.com/kotovalexarian/digest-blake2b
|
27
|
+
'homepage_uri' => 'https://github.com/kotovalexarian/digest-blake2b',
|
28
|
+
'source_code_uri' => 'https://github.com/kotovalexarian/digest-blake2b',
|
28
29
|
'bug_tracker_uri' =>
|
29
|
-
'https://github.com/kotovalexarian/digest-blake2b
|
30
|
+
'https://github.com/kotovalexarian/digest-blake2b/issues',
|
30
31
|
}.freeze
|
31
32
|
|
32
33
|
spec.bindir = 'exe'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/digest/blake2b/key.rb
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: digest-blake2b
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franck Verrot
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-09
|
12
|
+
date: 2019-10-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake-compiler
|
@@ -97,13 +97,13 @@ files:
|
|
97
97
|
- lib/digest/blake2b/key.rb
|
98
98
|
- lib/digest/blake2b/version.rb
|
99
99
|
- performance/performance_suite.rb
|
100
|
-
homepage: https://github.com/kotovalexarian/digest-blake2b
|
100
|
+
homepage: https://github.com/kotovalexarian/digest-blake2b
|
101
101
|
licenses:
|
102
102
|
- GPL-3.0
|
103
103
|
metadata:
|
104
|
-
homepage_uri: https://github.com/kotovalexarian/digest-blake2b
|
105
|
-
source_code_uri: https://github.com/kotovalexarian/digest-blake2b
|
106
|
-
bug_tracker_uri: https://github.com/kotovalexarian/digest-blake2b
|
104
|
+
homepage_uri: https://github.com/kotovalexarian/digest-blake2b
|
105
|
+
source_code_uri: https://github.com/kotovalexarian/digest-blake2b
|
106
|
+
bug_tracker_uri: https://github.com/kotovalexarian/digest-blake2b/issues
|
107
107
|
post_install_message:
|
108
108
|
rdoc_options: []
|
109
109
|
require_paths:
|