ruby-paseto 0.1.1 → 0.2.0

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.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -1
  3. data/README.md +55 -50
  4. data/lib/paseto/asn1/ecdsa_signature.rb +2 -2
  5. data/lib/paseto/asymmetric_key.rb +7 -4
  6. data/lib/paseto/configuration/decode_configuration.rb +7 -7
  7. data/lib/paseto/interface/key.rb +5 -2
  8. data/lib/paseto/interface/pbkd.rb +4 -20
  9. data/lib/paseto/interface/pie.rb +5 -26
  10. data/lib/paseto/interface/pke.rb +15 -51
  11. data/lib/paseto/interface/version.rb +30 -117
  12. data/lib/paseto/operations/id/i_dv3.rb +1 -1
  13. data/lib/paseto/operations/id/i_dv4.rb +1 -1
  14. data/lib/paseto/operations/pbkd/p_b_k_dv3.rb +4 -5
  15. data/lib/paseto/operations/pbkd/p_b_k_dv4.rb +3 -4
  16. data/lib/paseto/operations/pbkw.rb +6 -6
  17. data/lib/paseto/operations/pke/p_k_ev3.rb +23 -25
  18. data/lib/paseto/operations/pke/p_k_ev4.rb +33 -34
  19. data/lib/paseto/operations/pke.rb +9 -10
  20. data/lib/paseto/operations/wrap.rb +1 -1
  21. data/lib/paseto/paserk.rb +1 -1
  22. data/lib/paseto/paserk_types.rb +3 -3
  23. data/lib/paseto/protocol/version3.rb +17 -16
  24. data/lib/paseto/protocol/version4.rb +17 -16
  25. data/lib/paseto/symmetric_key.rb +16 -10
  26. data/lib/paseto/token.rb +17 -15
  27. data/lib/paseto/token_types.rb +2 -2
  28. data/lib/paseto/util.rb +2 -3
  29. data/lib/paseto/v3/local.rb +1 -1
  30. data/lib/paseto/v3/public.rb +8 -69
  31. data/lib/paseto/v4/local.rb +3 -3
  32. data/lib/paseto/v4/public.rb +3 -6
  33. data/lib/paseto/validator.rb +1 -1
  34. data/lib/paseto/version.rb +1 -1
  35. data/lib/paseto/versions.rb +2 -2
  36. data/lib/paseto/wrappers/pie/pie_v3.rb +18 -21
  37. data/lib/paseto/wrappers/pie/pie_v4.rb +17 -20
  38. data/lib/paseto/wrappers/pie.rb +3 -17
  39. data/lib/paseto.rb +2 -5
  40. data/paseto.gemspec +5 -17
  41. data/sorbet/rbi/annotations/.gitattributes +1 -0
  42. data/sorbet/rbi/annotations/rainbow.rbi +4 -4
  43. data/sorbet/rbi/gems/.gitattributes +1 -0
  44. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1 -1
  45. data/sorbet/rbi/gems/docile@1.4.0.rbi +1 -1
  46. data/sorbet/rbi/gems/{ffi@1.15.5.rbi → ffi@1.16.3.rbi} +260 -117
  47. data/sorbet/rbi/gems/{oj@3.13.23.rbi → oj@3.16.1.rbi} +28 -37
  48. data/sorbet/rbi/gems/{rake@13.0.6.rbi → rake@13.1.0.rbi} +75 -69
  49. data/sorbet/rbi/gems/rbnacl@7.1.1.rbi +2 -2
  50. data/sorbet/rbi/gems/{rspec-core@3.12.0.rbi → rspec-core@3.12.2.rbi} +31 -113
  51. data/sorbet/rbi/gems/{rspec-expectations@3.12.0.rbi → rspec-expectations@3.12.3.rbi} +204 -194
  52. data/sorbet/rbi/gems/{rspec-mocks@3.12.0.rbi → rspec-mocks@3.12.6.rbi} +225 -215
  53. data/sorbet/rbi/gems/{rspec-support@3.12.0.rbi → rspec-support@3.12.1.rbi} +35 -43
  54. data/sorbet/rbi/gems/rspec@3.12.0.rbi +22 -28
  55. data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +41 -44
  56. data/sorbet/rbi/gems/{simplecov@0.21.2.rbi → simplecov@0.22.0.rbi} +62 -49
  57. data/sorbet/rbi/gems/simplecov_json_formatter@0.1.4.rbi +232 -2
  58. data/sorbet/rbi/gems/{timecop@0.9.6.rbi → timecop@0.9.8.rbi} +13 -16
  59. data/sorbet/rbi/shims/multi_json.rbi +2 -0
  60. data/sorbet/rbi/shims/openssl.rbi +0 -8
  61. data/sorbet/rbi/todo.rbi +5 -1
  62. data/sorbet/tapioca/config.yml +1 -1
  63. metadata +20 -191
  64. data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -584
  65. data/sorbet/rbi/gems/io-console@0.5.11.rbi +0 -8
  66. data/sorbet/rbi/gems/irb@1.5.1.rbi +0 -342
  67. data/sorbet/rbi/gems/json@2.6.3.rbi +0 -1541
  68. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +0 -267
  69. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -158
  70. data/sorbet/rbi/gems/openssl@3.0.1.rbi +0 -1735
  71. data/sorbet/rbi/gems/parallel@1.22.1.rbi +0 -277
  72. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -407
  73. data/sorbet/rbi/gems/regexp_parser@2.6.1.rbi +0 -3481
  74. data/sorbet/rbi/gems/reline@0.3.1.rbi +0 -8
  75. data/sorbet/rbi/gems/rexml@3.2.5.rbi +0 -4717
  76. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +0 -1239
  77. data/sorbet/rbi/gems/thor@1.2.1.rbi +0 -3956
  78. data/sorbet/rbi/gems/unicode-display_width@2.3.0.rbi +0 -48
  79. data/sorbet/rbi/gems/webrick@1.7.0.rbi +0 -2555
  80. data/sorbet/rbi/gems/yard-sorbet@0.7.0.rbi +0 -391
  81. data/sorbet/rbi/gems/yard@0.9.28.rbi +0 -17816
  82. data/sorbet/rbi/gems/zeitwerk@2.6.6.rbi +0 -950
@@ -1,267 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `multi_json` gem.
5
- # Please instead update this file by running `bin/tapioca gem multi_json`.
6
-
7
- # source://multi_json//lib/multi_json/options.rb#1
8
- module MultiJson
9
- include ::MultiJson::Options
10
- extend ::MultiJson::Options
11
- extend ::MultiJson
12
-
13
- # Get the current adapter class.
14
- #
15
- # source://multi_json//lib/multi_json.rb#70
16
- def adapter; end
17
-
18
- # Set the JSON parser utilizing a symbol, string, or class.
19
- # Supported by default are:
20
- #
21
- # * <tt>:oj</tt>
22
- # * <tt>:json_gem</tt>
23
- # * <tt>:json_pure</tt>
24
- # * <tt>:ok_json</tt>
25
- # * <tt>:yajl</tt>
26
- # * <tt>:nsjsonserialization</tt> (MacRuby only)
27
- # * <tt>:gson</tt> (JRuby only)
28
- # * <tt>:jr_jackson</tt> (JRuby only)
29
- #
30
- # source://multi_json//lib/multi_json.rb#90
31
- def adapter=(new_adapter); end
32
-
33
- # source://multi_json//lib/multi_json.rb#26
34
- def cached_options(*_arg0); end
35
-
36
- # source://multi_json//lib/multi_json.rb#129
37
- def current_adapter(options = T.unsafe(nil)); end
38
-
39
- # Decode a JSON string into Ruby.
40
- #
41
- # <b>Options</b>
42
- #
43
- # <tt>:symbolize_keys</tt> :: If true, will use symbols instead of strings for the keys.
44
- # <tt>:adapter</tt> :: If set, the selected adapter will be used for this call.
45
- #
46
- # source://multi_json//lib/multi_json.rb#119
47
- def decode(string, options = T.unsafe(nil)); end
48
-
49
- # The default adapter based on what you currently
50
- # have loaded and installed. First checks to see
51
- # if any adapters are already loaded, then checks
52
- # to see which are installed if none are loaded.
53
- #
54
- # source://multi_json//lib/multi_json.rb#46
55
- def default_adapter; end
56
-
57
- # The default adapter based on what you currently
58
- # have loaded and installed. First checks to see
59
- # if any adapters are already loaded, then checks
60
- # to see which are installed if none are loaded.
61
- #
62
- # source://multi_json//lib/multi_json.rb#46
63
- def default_engine; end
64
-
65
- # source://multi_json//lib/multi_json.rb#18
66
- def default_options; end
67
-
68
- # source://multi_json//lib/multi_json.rb#11
69
- def default_options=(value); end
70
-
71
- # Encodes a Ruby object as JSON.
72
- #
73
- # source://multi_json//lib/multi_json.rb#138
74
- def dump(object, options = T.unsafe(nil)); end
75
-
76
- # Encodes a Ruby object as JSON.
77
- #
78
- # source://multi_json//lib/multi_json.rb#138
79
- def encode(object, options = T.unsafe(nil)); end
80
-
81
- # Get the current adapter class.
82
- #
83
- # source://multi_json//lib/multi_json.rb#70
84
- def engine; end
85
-
86
- # Set the JSON parser utilizing a symbol, string, or class.
87
- # Supported by default are:
88
- #
89
- # * <tt>:oj</tt>
90
- # * <tt>:json_gem</tt>
91
- # * <tt>:json_pure</tt>
92
- # * <tt>:ok_json</tt>
93
- # * <tt>:yajl</tt>
94
- # * <tt>:nsjsonserialization</tt> (MacRuby only)
95
- # * <tt>:gson</tt> (JRuby only)
96
- # * <tt>:jr_jackson</tt> (JRuby only)
97
- #
98
- # source://multi_json//lib/multi_json.rb#90
99
- def engine=(new_adapter); end
100
-
101
- # Decode a JSON string into Ruby.
102
- #
103
- # <b>Options</b>
104
- #
105
- # <tt>:symbolize_keys</tt> :: If true, will use symbols instead of strings for the keys.
106
- # <tt>:adapter</tt> :: If set, the selected adapter will be used for this call.
107
- #
108
- # source://multi_json//lib/multi_json.rb#119
109
- def load(string, options = T.unsafe(nil)); end
110
-
111
- # source://multi_json//lib/multi_json.rb#98
112
- def load_adapter(new_adapter); end
113
-
114
- # source://multi_json//lib/multi_json.rb#26
115
- def reset_cached_options!(*_arg0); end
116
-
117
- # Set the JSON parser utilizing a symbol, string, or class.
118
- # Supported by default are:
119
- #
120
- # * <tt>:oj</tt>
121
- # * <tt>:json_gem</tt>
122
- # * <tt>:json_pure</tt>
123
- # * <tt>:ok_json</tt>
124
- # * <tt>:yajl</tt>
125
- # * <tt>:nsjsonserialization</tt> (MacRuby only)
126
- # * <tt>:gson</tt> (JRuby only)
127
- # * <tt>:jr_jackson</tt> (JRuby only)
128
- #
129
- # source://multi_json//lib/multi_json.rb#90
130
- def use(new_adapter); end
131
-
132
- # Executes passed block using specified adapter.
133
- #
134
- # source://multi_json//lib/multi_json.rb#144
135
- def with_adapter(new_adapter); end
136
-
137
- # Executes passed block using specified adapter.
138
- #
139
- # source://multi_json//lib/multi_json.rb#144
140
- def with_engine(new_adapter); end
141
-
142
- private
143
-
144
- # source://multi_json//lib/multi_json.rb#155
145
- def load_adapter_from_string_name(name); end
146
- end
147
-
148
- # source://multi_json//lib/multi_json.rb#31
149
- MultiJson::ALIASES = T.let(T.unsafe(nil), Hash)
150
-
151
- # source://multi_json//lib/multi_json/adapter_error.rb#2
152
- class MultiJson::AdapterError < ::ArgumentError
153
- # Returns the value of attribute cause.
154
- #
155
- # source://multi_json//lib/multi_json/adapter_error.rb#3
156
- def cause; end
157
-
158
- class << self
159
- # source://multi_json//lib/multi_json/adapter_error.rb#5
160
- def build(original_exception); end
161
- end
162
- end
163
-
164
- # Legacy support
165
- #
166
- # source://multi_json//lib/multi_json/parse_error.rb#16
167
- MultiJson::DecodeError = MultiJson::ParseError
168
-
169
- # source://multi_json//lib/multi_json/parse_error.rb#16
170
- MultiJson::LoadError = MultiJson::ParseError
171
-
172
- # source://multi_json//lib/multi_json/options.rb#2
173
- module MultiJson::Options
174
- # source://multi_json//lib/multi_json/options.rb#25
175
- def default_dump_options; end
176
-
177
- # source://multi_json//lib/multi_json/options.rb#21
178
- def default_load_options; end
179
-
180
- # source://multi_json//lib/multi_json/options.rb#17
181
- def dump_options(*args); end
182
-
183
- # source://multi_json//lib/multi_json/options.rb#8
184
- def dump_options=(options); end
185
-
186
- # source://multi_json//lib/multi_json/options.rb#13
187
- def load_options(*args); end
188
-
189
- # source://multi_json//lib/multi_json/options.rb#3
190
- def load_options=(options); end
191
-
192
- private
193
-
194
- # source://multi_json//lib/multi_json/options.rb#31
195
- def get_options(options, *args); end
196
- end
197
-
198
- # source://multi_json//lib/multi_json/options_cache.rb#2
199
- module MultiJson::OptionsCache
200
- extend ::MultiJson::OptionsCache
201
-
202
- # source://multi_json//lib/multi_json/options_cache.rb#10
203
- def fetch(type, key, &block); end
204
-
205
- # source://multi_json//lib/multi_json/options_cache.rb#5
206
- def reset; end
207
-
208
- private
209
-
210
- # source://multi_json//lib/multi_json/options_cache.rb#24
211
- def write(cache, key); end
212
- end
213
-
214
- # Normally MultiJson is used with a few option sets for both dump/load
215
- # methods. When options are generated dynamically though, every call would
216
- # cause a cache miss and the cache would grow indefinitely. To prevent
217
- # this, we just reset the cache every time the number of keys outgrows
218
- # 1000.
219
- #
220
- # source://multi_json//lib/multi_json/options_cache.rb#22
221
- MultiJson::OptionsCache::MAX_CACHE_SIZE = T.let(T.unsafe(nil), Integer)
222
-
223
- # source://multi_json//lib/multi_json/parse_error.rb#2
224
- class MultiJson::ParseError < ::StandardError
225
- # Returns the value of attribute cause.
226
- #
227
- # source://multi_json//lib/multi_json/parse_error.rb#3
228
- def cause; end
229
-
230
- # Returns the value of attribute data.
231
- #
232
- # source://multi_json//lib/multi_json/parse_error.rb#3
233
- def data; end
234
-
235
- class << self
236
- # source://multi_json//lib/multi_json/parse_error.rb#5
237
- def build(original_exception, data); end
238
- end
239
- end
240
-
241
- # source://multi_json//lib/multi_json.rb#33
242
- MultiJson::REQUIREMENT_MAP = T.let(T.unsafe(nil), Array)
243
-
244
- # source://multi_json//lib/multi_json/version.rb#16
245
- MultiJson::VERSION = T.let(T.unsafe(nil), String)
246
-
247
- # source://multi_json//lib/multi_json/version.rb#2
248
- class MultiJson::Version
249
- class << self
250
- # @return [String]
251
- #
252
- # source://multi_json//lib/multi_json/version.rb#10
253
- def to_s; end
254
- end
255
- end
256
-
257
- # source://multi_json//lib/multi_json/version.rb#3
258
- MultiJson::Version::MAJOR = T.let(T.unsafe(nil), Integer)
259
-
260
- # source://multi_json//lib/multi_json/version.rb#4
261
- MultiJson::Version::MINOR = T.let(T.unsafe(nil), Integer)
262
-
263
- # source://multi_json//lib/multi_json/version.rb#5
264
- MultiJson::Version::PATCH = T.let(T.unsafe(nil), Integer)
265
-
266
- # source://multi_json//lib/multi_json/version.rb#6
267
- MultiJson::Version::PRE = T.let(T.unsafe(nil), T.untyped)
@@ -1,158 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `netrc` gem.
5
- # Please instead update this file by running `bin/tapioca gem netrc`.
6
-
7
- # source://netrc//lib/netrc.rb#3
8
- class Netrc
9
- # @return [Netrc] a new instance of Netrc
10
- #
11
- # source://netrc//lib/netrc.rb#166
12
- def initialize(path, data); end
13
-
14
- # source://netrc//lib/netrc.rb#180
15
- def [](k); end
16
-
17
- # source://netrc//lib/netrc.rb#188
18
- def []=(k, info); end
19
-
20
- # source://netrc//lib/netrc.rb#200
21
- def delete(key); end
22
-
23
- # source://netrc//lib/netrc.rb#211
24
- def each(&block); end
25
-
26
- # source://netrc//lib/netrc.rb#196
27
- def length; end
28
-
29
- # source://netrc//lib/netrc.rb#215
30
- def new_item(m, l, p); end
31
-
32
- # Returns the value of attribute new_item_prefix.
33
- #
34
- # source://netrc//lib/netrc.rb#178
35
- def new_item_prefix; end
36
-
37
- # Sets the attribute new_item_prefix
38
- #
39
- # @param value the value to set the attribute new_item_prefix to.
40
- #
41
- # source://netrc//lib/netrc.rb#178
42
- def new_item_prefix=(_arg0); end
43
-
44
- # source://netrc//lib/netrc.rb#219
45
- def save; end
46
-
47
- # source://netrc//lib/netrc.rb#233
48
- def unparse; end
49
-
50
- class << self
51
- # source://netrc//lib/netrc.rb#42
52
- def check_permissions(path); end
53
-
54
- # source://netrc//lib/netrc.rb#33
55
- def config; end
56
-
57
- # @yield [self.config]
58
- #
59
- # source://netrc//lib/netrc.rb#37
60
- def configure; end
61
-
62
- # source://netrc//lib/netrc.rb#10
63
- def default_path; end
64
-
65
- # source://netrc//lib/netrc.rb#14
66
- def home_path; end
67
-
68
- # source://netrc//lib/netrc.rb#85
69
- def lex(lines); end
70
-
71
- # source://netrc//lib/netrc.rb#29
72
- def netrc_filename; end
73
-
74
- # Returns two values, a header and a list of items.
75
- # Each item is a tuple, containing some or all of:
76
- # - machine keyword (including trailing whitespace+comments)
77
- # - machine name
78
- # - login keyword (including surrounding whitespace+comments)
79
- # - login
80
- # - password keyword (including surrounding whitespace+comments)
81
- # - password
82
- # - trailing chars
83
- # This lets us change individual fields, then write out the file
84
- # with all its original formatting.
85
- #
86
- # source://netrc//lib/netrc.rb#129
87
- def parse(ts); end
88
-
89
- # Reads path and parses it as a .netrc file. If path doesn't
90
- # exist, returns an empty object. Decrypt paths ending in .gpg.
91
- #
92
- # source://netrc//lib/netrc.rb#51
93
- def read(path = T.unsafe(nil)); end
94
-
95
- # @return [Boolean]
96
- #
97
- # source://netrc//lib/netrc.rb#112
98
- def skip?(s); end
99
- end
100
- end
101
-
102
- # source://netrc//lib/netrc.rb#8
103
- Netrc::CYGWIN = T.let(T.unsafe(nil), T.untyped)
104
-
105
- # source://netrc//lib/netrc.rb#244
106
- class Netrc::Entry < ::Struct
107
- # Returns the value of attribute login
108
- #
109
- # @return [Object] the current value of login
110
- def login; end
111
-
112
- # Sets the attribute login
113
- #
114
- # @param value [Object] the value to set the attribute login to.
115
- # @return [Object] the newly set value
116
- def login=(_); end
117
-
118
- # Returns the value of attribute password
119
- #
120
- # @return [Object] the current value of password
121
- def password; end
122
-
123
- # Sets the attribute password
124
- #
125
- # @param value [Object] the value to set the attribute password to.
126
- # @return [Object] the newly set value
127
- def password=(_); end
128
-
129
- def to_ary; end
130
-
131
- class << self
132
- def [](*_arg0); end
133
- def inspect; end
134
- def keyword_init?; end
135
- def members; end
136
- def new(*_arg0); end
137
- end
138
- end
139
-
140
- # source://netrc//lib/netrc.rb#250
141
- class Netrc::Error < ::StandardError; end
142
-
143
- # source://netrc//lib/netrc.rb#68
144
- class Netrc::TokenArray < ::Array
145
- # source://netrc//lib/netrc.rb#76
146
- def readto; end
147
-
148
- # source://netrc//lib/netrc.rb#69
149
- def take; end
150
- end
151
-
152
- # source://netrc//lib/netrc.rb#4
153
- Netrc::VERSION = T.let(T.unsafe(nil), String)
154
-
155
- # see http://stackoverflow.com/questions/4871309/what-is-the-correct-way-to-detect-if-ruby-is-running-on-windows
156
- #
157
- # source://netrc//lib/netrc.rb#7
158
- Netrc::WINDOWS = T.let(T.unsafe(nil), T.untyped)