rbnacl 7.1.0 → 7.1.1
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/.travis.yml +1 -0
- data/CHANGES.md +36 -26
- data/README.md +18 -29
- data/lib/rbnacl.rb +1 -1
- data/lib/rbnacl/hmac/sha256.rb +13 -13
- data/lib/rbnacl/hmac/sha512.rb +13 -13
- data/lib/rbnacl/hmac/sha512256.rb +13 -13
- data/lib/rbnacl/version.rb +1 -1
- data/rbnacl.gemspec +8 -1
- metadata +9 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6bc276dfd0153342775c925fc59964d2df76248c1c16f89d07d802ca841b6bc5
|
|
4
|
+
data.tar.gz: 6ffdb056f41764d542a024ea0e268e0ddf3b71debba7e424c8a12a5eee5c442d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6a9a738528fdebf377fa0076b9ec20f2d073e8f214e18f0e9b0f607d67d9b355247577671d4c642d4caa3e6f7edd0e82799a80cefa0baa4947c5d207c3c76c48
|
|
7
|
+
data.tar.gz: cd6509dae23175b83f8ced49f70eff8616f7a555feb10de17f5f386823d378c8909a89b41decd4c7fb6e2d4119dd2a31a13701b1c12bdc1278702da86f3a89bb
|
data/.travis.yml
CHANGED
data/CHANGES.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## [7.1.1] (2020-01-27)
|
|
2
|
+
|
|
3
|
+
- Test on Ruby 2.7 ([#208])
|
|
4
|
+
- Add project metadata to the gemspec ([#207])
|
|
5
|
+
- Resolve FFI deprecation warning ([#206])
|
|
6
|
+
|
|
1
7
|
## [7.1.0] (2019-09-07)
|
|
2
8
|
|
|
3
9
|
- Attached signature API ([#197], [#202])
|
|
@@ -110,29 +116,33 @@
|
|
|
110
116
|
|
|
111
117
|
- Initial release
|
|
112
118
|
|
|
113
|
-
[7.1.
|
|
114
|
-
[#
|
|
115
|
-
[#
|
|
116
|
-
[#
|
|
117
|
-
[7.
|
|
118
|
-
[#
|
|
119
|
-
[
|
|
120
|
-
[#
|
|
121
|
-
[
|
|
122
|
-
[#
|
|
123
|
-
[6.0.
|
|
124
|
-
[#
|
|
125
|
-
[#
|
|
126
|
-
[#
|
|
127
|
-
[
|
|
128
|
-
[#
|
|
129
|
-
[#
|
|
130
|
-
[#
|
|
131
|
-
[#
|
|
132
|
-
[#
|
|
133
|
-
[#
|
|
134
|
-
[#
|
|
135
|
-
[#
|
|
136
|
-
[#
|
|
137
|
-
[#
|
|
138
|
-
[#
|
|
119
|
+
[7.1.1]: https://github.com/RubyCrypto/rbnacl/pull/210
|
|
120
|
+
[#208]: https://github.com/RubyCrypto/rbnacl/pull/208
|
|
121
|
+
[#207]: https://github.com/RubyCrypto/rbnacl/pull/207
|
|
122
|
+
[#206]: https://github.com/RubyCrypto/rbnacl/pull/206
|
|
123
|
+
[7.1.0]: https://github.com/RubyCrypto/rbnacl/pull/203
|
|
124
|
+
[#202]: https://github.com/RubyCrypto/rbnacl/pull/202
|
|
125
|
+
[#200]: https://github.com/RubyCrypto/rbnacl/pull/200
|
|
126
|
+
[#197]: https://github.com/RubyCrypto/rbnacl/pull/197
|
|
127
|
+
[7.0.0]: https://github.com/RubyCrypto/rbnacl/pull/195
|
|
128
|
+
[#194]: https://github.com/RubyCrypto/rbnacl/pull/194
|
|
129
|
+
[6.0.1]: https://github.com/RubyCrypto/rbnacl/pull/191
|
|
130
|
+
[#189]: https://github.com/RubyCrypto/rbnacl/pull/189
|
|
131
|
+
[#186]: https://github.com/RubyCrypto/rbnacl/pull/186
|
|
132
|
+
[#184]: https://github.com/RubyCrypto/rbnacl/pull/184
|
|
133
|
+
[6.0.0]: https://github.com/RubyCrypto/rbnacl/pull/182
|
|
134
|
+
[#180]: https://github.com/RubyCrypto/rbnacl/pull/180
|
|
135
|
+
[#176]: https://github.com/RubyCrypto/rbnacl/pull/176
|
|
136
|
+
[#174]: https://github.com/RubyCrypto/rbnacl/pull/174
|
|
137
|
+
[#172]: https://github.com/RubyCrypto/rbnacl/pull/172
|
|
138
|
+
[#166]: https://github.com/RubyCrypto/rbnacl/pull/166
|
|
139
|
+
[#159]: https://github.com/RubyCrypto/rbnacl/pull/159
|
|
140
|
+
[#157]: https://github.com/RubyCrypto/rbnacl/pull/157
|
|
141
|
+
[#148]: https://github.com/RubyCrypto/rbnacl/pull/148
|
|
142
|
+
[#143]: https://github.com/RubyCrypto/rbnacl/pull/143
|
|
143
|
+
[#142]: https://github.com/RubyCrypto/rbnacl/pull/142
|
|
144
|
+
[#141]: https://github.com/RubyCrypto/rbnacl/pull/141
|
|
145
|
+
[#137]: https://github.com/RubyCrypto/rbnacl/pull/137
|
|
146
|
+
[#135]: https://github.com/RubyCrypto/rbnacl/pull/135
|
|
147
|
+
[#128]: https://github.com/RubyCrypto/rbnacl/pull/128
|
|
148
|
+
[#105]: https://github.com/RubyCrypto/rbnacl/pull/105
|
data/README.md
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-

|
|
2
2
|
======
|
|
3
3
|
[](http://badge.fury.io/rb/rbnacl)
|
|
4
|
-
[](https://github.com/
|
|
8
|
-
[](https://gitter.im/crypto-rb/Lobby)
|
|
4
|
+
[](https://travis-ci.org/RubyCrypto/rbnacl)
|
|
5
|
+
[](https://codeclimate.com/github/RubyCrypto/rbnacl)
|
|
6
|
+
[](https://coveralls.io/r/RubyCrypto/rbnacl)
|
|
7
|
+
[](https://github.com/RubyCrypto/rbnacl/blob/master/LICENSE.txt)
|
|
9
8
|
|
|
10
|
-
Ruby binding for [libsodium], a fork of the [Networking and Cryptography][
|
|
9
|
+
Ruby binding for [libsodium], a fork of the [Networking and Cryptography][NaCl]
|
|
11
10
|
library.
|
|
12
11
|
|
|
13
12
|
[libsodium]: https://libsodium.org
|
|
14
|
-
[
|
|
13
|
+
[NaCl]: http://nacl.cr.yp.to/
|
|
15
14
|
|
|
16
15
|
## Why libsodium/NaCl?
|
|
17
16
|
|
|
@@ -41,17 +40,6 @@ is extremely fast with comparatively small cryptographic keys.
|
|
|
41
40
|
|
|
42
41
|
[Yes.](http://news.ycombinator.com/item?id=3067434)
|
|
43
42
|
|
|
44
|
-
## Help and Discussion
|
|
45
|
-
|
|
46
|
-
Have questions? Want to suggest a feature or change? Join a discussion group:
|
|
47
|
-
|
|
48
|
-
* [Crypto.rb Gitter]: web-based chat about Ruby crypto projects including **RbNaCl**.
|
|
49
|
-
* [Crypto.rb Google Group]: join via web or email ([crypto-rb+subscribe@googlegroups.com])
|
|
50
|
-
|
|
51
|
-
[Crypto.rb Gitter]: https://gitter.im/crypto-rb/Lobby
|
|
52
|
-
[Crypto.rb Google Group]: https://groups.google.com/forum/#!forum/crypto-rb
|
|
53
|
-
[crypto-rb+subscribe@googlegroups.com]: mailto:crypto-rb+subscribe@googlegroups.com?subject=subscribe
|
|
54
|
-
|
|
55
43
|
## Supported platforms
|
|
56
44
|
|
|
57
45
|
You can use RbNaCl on platforms libsodium is supported (see below).
|
|
@@ -61,15 +49,16 @@ versions:
|
|
|
61
49
|
|
|
62
50
|
* Ruby 2.5
|
|
63
51
|
* Ruby 2.6
|
|
52
|
+
* Ruby 2.7
|
|
64
53
|
* JRuby 9.2
|
|
65
54
|
|
|
66
55
|
If something doesn't work on one of these versions, it's a bug.
|
|
67
56
|
|
|
68
|
-
[travis]: http://travis-ci.org/
|
|
57
|
+
[travis]: http://travis-ci.org/RubyCrypto/rbnacl
|
|
69
58
|
|
|
70
59
|
## Installation
|
|
71
60
|
|
|
72
|
-
Note: [Windows installation instructions are available](https://github.com/
|
|
61
|
+
Note: [Windows installation instructions are available](https://github.com/RubyCrypto/rbnacl/wiki/Installing-libsodium#windows).
|
|
73
62
|
|
|
74
63
|
### libsodium
|
|
75
64
|
|
|
@@ -135,13 +124,13 @@ information.
|
|
|
135
124
|
|
|
136
125
|
[YARD API documentation][yard] is also available.
|
|
137
126
|
|
|
138
|
-
[wiki]: https://github.com/
|
|
139
|
-
[simplebox]: https://github.com/
|
|
140
|
-
[secretkey]: https://github.com/
|
|
141
|
-
[publickey]: https://github.com/
|
|
142
|
-
[signatures]: https://github.com/
|
|
143
|
-
[macs]: https://github.com/
|
|
144
|
-
[hashes]: https://github.com/
|
|
127
|
+
[wiki]: https://github.com/RubyCrypto/rbnacl/wiki
|
|
128
|
+
[simplebox]: https://github.com/RubyCrypto/rbnacl/wiki/SimpleBox
|
|
129
|
+
[secretkey]: https://github.com/RubyCrypto/rbnacl/wiki/Secret-Key-Encryption
|
|
130
|
+
[publickey]: https://github.com/RubyCrypto/rbnacl/wiki/Public-Key-Encryption
|
|
131
|
+
[signatures]: https://github.com/RubyCrypto/rbnacl/wiki/Digital-Signatures
|
|
132
|
+
[macs]: https://github.com/RubyCrypto/rbnacl/wiki/HMAC
|
|
133
|
+
[hashes]: https://github.com/RubyCrypto/rbnacl/wiki/Hash-Functions
|
|
145
134
|
[yard]: http://www.rubydoc.info/gems/rbnacl
|
|
146
135
|
|
|
147
136
|
## Learn More
|
|
@@ -194,4 +183,4 @@ Sure, here you go:
|
|
|
194
183
|
Copyright (c) 2012-2018 Tony Arcieri, Jonathan Stott. Distributed under the MIT License.
|
|
195
184
|
See [LICENSE.txt] for further details.
|
|
196
185
|
|
|
197
|
-
[LICENSE.txt]: https://github.com/
|
|
186
|
+
[LICENSE.txt]: https://github.com/RubyCrypto/rbnacl/blob/master/LICENSE.txt
|
data/lib/rbnacl.rb
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
if defined?(RBNACL_LIBSODIUM_GEM_LIB_PATH)
|
|
5
5
|
raise "rbnacl-libsodium is not supported by rbnacl 6.0+. "\
|
|
6
6
|
"Please remove it as a dependency and install libsodium using your system package manager. "\
|
|
7
|
-
"See https://github.com/
|
|
7
|
+
"See https://github.com/RubyCrypto/rbnacl#installation"
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
require "rbnacl/version"
|
data/lib/rbnacl/hmac/sha256.rb
CHANGED
|
@@ -89,21 +89,21 @@ module RbNaCl
|
|
|
89
89
|
compute_authenticator(correct, message)
|
|
90
90
|
Util.verify32(correct, authenticator)
|
|
91
91
|
end
|
|
92
|
-
end
|
|
93
92
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
# The crypto_auth_hmacsha256_state struct representation
|
|
94
|
+
# ref: jedisct1/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha256.h
|
|
95
|
+
class SHA256State < FFI::Struct
|
|
96
|
+
layout :state, [:uint32, 8],
|
|
97
|
+
:count, :uint64,
|
|
98
|
+
:buf, [:uint8, 64]
|
|
99
|
+
end
|
|
101
100
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
101
|
+
# The crypto_hash_sha256_state struct representation
|
|
102
|
+
# ref: jedisct1/libsodium/src/libsodium/include/sodium/crypto_hash_sha256.h
|
|
103
|
+
class State < FFI::Struct
|
|
104
|
+
layout :ictx, SHA256State,
|
|
105
|
+
:octx, SHA256State
|
|
106
|
+
end
|
|
107
107
|
end
|
|
108
108
|
end
|
|
109
109
|
end
|
data/lib/rbnacl/hmac/sha512.rb
CHANGED
|
@@ -89,21 +89,21 @@ module RbNaCl
|
|
|
89
89
|
compute_authenticator(correct, message)
|
|
90
90
|
Util.verify64(correct, authenticator)
|
|
91
91
|
end
|
|
92
|
-
end
|
|
93
92
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
93
|
+
# The crypto_auth_hmacsha512_state struct representation
|
|
94
|
+
# ref: jedisct1/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512.h
|
|
95
|
+
class SHA512State < FFI::Struct
|
|
96
|
+
layout :state, [:uint64, 8],
|
|
97
|
+
:count, [:uint64, 2],
|
|
98
|
+
:buf, [:uint8, 128]
|
|
99
|
+
end
|
|
101
100
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
101
|
+
# The crypto_hash_sha512_state struct representation
|
|
102
|
+
# ref: jedisct1/libsodium/src/libsodium/include/sodium/crypto_hash_sha512.h
|
|
103
|
+
class State < FFI::Struct
|
|
104
|
+
layout :ictx, SHA512State,
|
|
105
|
+
:octx, SHA512State
|
|
106
|
+
end
|
|
107
107
|
end
|
|
108
108
|
end
|
|
109
109
|
end
|
|
@@ -87,21 +87,21 @@ module RbNaCl
|
|
|
87
87
|
compute_authenticator(correct, message)
|
|
88
88
|
Util.verify32(correct, authenticator)
|
|
89
89
|
end
|
|
90
|
-
end
|
|
91
90
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
91
|
+
# The crypto_auth_hmacsha512256_state struct representation
|
|
92
|
+
# ref: jedisct1/libsodium/src/libsodium/include/sodium/crypto_auth_hmacsha512256.h
|
|
93
|
+
class SHA512256State < FFI::Struct
|
|
94
|
+
layout :state, [:uint64, 8],
|
|
95
|
+
:count, [:uint64, 2],
|
|
96
|
+
:buf, [:uint8, 128]
|
|
97
|
+
end
|
|
99
98
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
# The crypto_hash_sha512_state struct representation
|
|
100
|
+
# ref: jedisct1/libsodium/src/libsodium/include/sodium/crypto_hash_sha512.h
|
|
101
|
+
class State < FFI::Struct
|
|
102
|
+
layout :ictx, SHA512256State,
|
|
103
|
+
:octx, SHA512256State
|
|
104
|
+
end
|
|
105
105
|
end
|
|
106
106
|
end
|
|
107
107
|
end
|
data/lib/rbnacl/version.rb
CHANGED
data/rbnacl.gemspec
CHANGED
|
@@ -9,13 +9,20 @@ Gem::Specification.new do |spec|
|
|
|
9
9
|
spec.version = RbNaCl::VERSION
|
|
10
10
|
spec.authors = ["Tony Arcieri", "Jonathan Stott"]
|
|
11
11
|
spec.email = ["bascule@gmail.com", "jonathan.stott@gmail.com"]
|
|
12
|
-
spec.homepage = "https://github.com/
|
|
12
|
+
spec.homepage = "https://github.com/RubyCrypto/rbnacl"
|
|
13
13
|
spec.licenses = ["MIT"]
|
|
14
14
|
spec.summary = "Ruby binding to the libsodium/NaCl cryptography library"
|
|
15
15
|
spec.description = <<-DESCRIPTION.strip.gsub(/\s+/, " ")
|
|
16
16
|
The Networking and Cryptography (NaCl) library provides a high-level toolkit for building
|
|
17
17
|
cryptographic systems and protocols
|
|
18
18
|
DESCRIPTION
|
|
19
|
+
spec.metadata = {
|
|
20
|
+
"bug_tracker_uri" => "#{spec.homepage}/issues",
|
|
21
|
+
"changelog_uri" => "#{spec.homepage}/blob/master/CHANGES.md",
|
|
22
|
+
"documentation_uri" => "https://www.rubydoc.info/gems/#{spec.name}/#{spec.version}",
|
|
23
|
+
"source_code_uri" => "#{spec.homepage}/tree/v#{spec.version}",
|
|
24
|
+
"wiki_uri" => "#{spec.homepage}/wiki"
|
|
25
|
+
}
|
|
19
26
|
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
|
20
27
|
spec.executables = spec.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
|
21
28
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rbnacl
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.1.
|
|
4
|
+
version: 7.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tony Arcieri
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2020-01-27 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: ffi
|
|
@@ -135,10 +135,15 @@ files:
|
|
|
135
135
|
- spec/spec_helper.rb
|
|
136
136
|
- tasks/rspec.rake
|
|
137
137
|
- tasks/rubocop.rake
|
|
138
|
-
homepage: https://github.com/
|
|
138
|
+
homepage: https://github.com/RubyCrypto/rbnacl
|
|
139
139
|
licenses:
|
|
140
140
|
- MIT
|
|
141
|
-
metadata:
|
|
141
|
+
metadata:
|
|
142
|
+
bug_tracker_uri: https://github.com/RubyCrypto/rbnacl/issues
|
|
143
|
+
changelog_uri: https://github.com/RubyCrypto/rbnacl/blob/master/CHANGES.md
|
|
144
|
+
documentation_uri: https://www.rubydoc.info/gems/rbnacl/7.1.1
|
|
145
|
+
source_code_uri: https://github.com/RubyCrypto/rbnacl/tree/v7.1.1
|
|
146
|
+
wiki_uri: https://github.com/RubyCrypto/rbnacl/wiki
|
|
142
147
|
post_install_message:
|
|
143
148
|
rdoc_options: []
|
|
144
149
|
require_paths:
|