digest-keccak 0.0.3 → 0.0.4
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/README.md +31 -23
- data/digest-keccak.gemspec +5 -4
- data/lib/digest/keccak/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: cb34593dc0e7af8996a800603f86f637c7e6835b2689ef4623f0fad8c65fb309
|
4
|
+
data.tar.gz: 40622274b49b6fb95fcd6280cf2c426d327a502c98a40beaa7a2782856d3cc8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f1b3f0ccc6cd4b38caa41546815e3e0f7089732d7a238c18c6c7a0943e3ec1b54d24f5bbe14b7856ee877ddcb9f9a6b52cda44d2d8ff7055a2c8685cf40da1b
|
7
|
+
data.tar.gz: 666234ce5665ce3ad73ebac8c96a92084046669d9c2b36b7aa9aebe428883ecfeab09b35a91249a35d42a7374b27b20191a8579b932593e2fc2f5723843fdac4
|
data/README.md
CHANGED
@@ -8,6 +8,14 @@ is almost identical to that of the `digest` standard library.
|
|
8
8
|
|
9
9
|
|
10
10
|
|
11
|
+
Table of contents
|
12
|
+
-----------------
|
13
|
+
|
14
|
+
* [Usage](#usage)
|
15
|
+
* [Development](#development)
|
16
|
+
|
17
|
+
|
18
|
+
|
11
19
|
Usage
|
12
20
|
-----
|
13
21
|
|
@@ -16,37 +24,37 @@ and variable length. Variable length is not supported by this Ruby extension.
|
|
16
24
|
Unless the user specifies otherwise, this Ruby extension assumes 512-bit.
|
17
25
|
|
18
26
|
```ruby
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
27
|
+
require 'digest/keccak'
|
28
|
+
|
29
|
+
# Generate 512-bit digest.
|
30
|
+
Digest::Keccak.digest 'foo' #=> "\x15\x97\x84*\xACR\xBC\x9D..."
|
31
|
+
Digest::Keccak.hexdigest 'foo' #=> "1597842aac52bc9d..."
|
32
|
+
|
33
|
+
# Generate 224-bit digest.
|
34
|
+
Digest::Keccak.digest 'foo', 224 #=> "\xDA\xA9M\xA7\xF6\x80k\xF5..."
|
35
|
+
Digest::Keccak.hexdigest 'foo', 224 #=> "daa94da7f6806bf5..."
|
36
|
+
|
37
|
+
# Use this interface to feed data in chunks. 512-bit by default.
|
38
|
+
digest = Digest::Keccak.new
|
39
|
+
digest.update 'f'
|
40
|
+
digest.update 'o'
|
41
|
+
digest.update 'o'
|
42
|
+
digest.digest #=> "\x15\x97\x84*\xACR\xBC\x9D..."
|
43
|
+
digest.hexdigest #=> "1597842aac52bc9d..."
|
44
|
+
|
45
|
+
# You can pass a hash length to the constructor.
|
46
|
+
digest = Digest::Keccak.new 224
|
39
47
|
```
|
40
48
|
|
41
49
|
|
42
50
|
|
43
|
-
|
44
|
-
|
51
|
+
Development
|
52
|
+
-----------
|
45
53
|
|
46
54
|
Run the test suite as follows:
|
47
55
|
|
48
56
|
```
|
49
|
-
|
57
|
+
make test
|
50
58
|
```
|
51
59
|
|
52
60
|
A part of the test suite is automatically generated from Keccak's reference
|
data/digest-keccak.gemspec
CHANGED
@@ -9,8 +9,9 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.name = 'digest-keccak'
|
10
10
|
spec.version = Digest::Keccak::VERSION
|
11
11
|
spec.license = 'MIT'
|
12
|
-
spec.homepage = 'https://github.com/kotovalexarian/digest-keccak
|
12
|
+
spec.homepage = 'https://github.com/kotovalexarian/digest-keccak'
|
13
13
|
spec.summary = 'The Keccak cryptographic hash function.'
|
14
|
+
spec.platform = Gem::Platform::RUBY
|
14
15
|
|
15
16
|
spec.required_ruby_version = '~> 2.2'
|
16
17
|
|
@@ -22,10 +23,10 @@ Gem::Specification.new do |spec|
|
|
22
23
|
DESCRIPTION
|
23
24
|
|
24
25
|
spec.metadata = {
|
25
|
-
'homepage_uri' => 'https://github.com/kotovalexarian/digest-keccak
|
26
|
-
'source_code_uri' => 'https://github.com/kotovalexarian/digest-keccak
|
26
|
+
'homepage_uri' => 'https://github.com/kotovalexarian/digest-keccak',
|
27
|
+
'source_code_uri' => 'https://github.com/kotovalexarian/digest-keccak',
|
27
28
|
'bug_tracker_uri' =>
|
28
|
-
'https://github.com/kotovalexarian/digest-keccak
|
29
|
+
'https://github.com/kotovalexarian/digest-keccak/issues',
|
29
30
|
}.freeze
|
30
31
|
|
31
32
|
spec.bindir = 'exe'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: digest-keccak
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hongli Lai (Phusion)
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-10-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -64,13 +64,13 @@ files:
|
|
64
64
|
- ext/digest/extconf.rb
|
65
65
|
- ext/digest/keccak.c
|
66
66
|
- lib/digest/keccak/version.rb
|
67
|
-
homepage: https://github.com/kotovalexarian/digest-keccak
|
67
|
+
homepage: https://github.com/kotovalexarian/digest-keccak
|
68
68
|
licenses:
|
69
69
|
- MIT
|
70
70
|
metadata:
|
71
|
-
homepage_uri: https://github.com/kotovalexarian/digest-keccak
|
72
|
-
source_code_uri: https://github.com/kotovalexarian/digest-keccak
|
73
|
-
bug_tracker_uri: https://github.com/kotovalexarian/digest-keccak
|
71
|
+
homepage_uri: https://github.com/kotovalexarian/digest-keccak
|
72
|
+
source_code_uri: https://github.com/kotovalexarian/digest-keccak
|
73
|
+
bug_tracker_uri: https://github.com/kotovalexarian/digest-keccak/issues
|
74
74
|
post_install_message:
|
75
75
|
rdoc_options: []
|
76
76
|
require_paths:
|