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
@@ -2640,7 +2640,7 @@ class RbNaCl::SimpleBox
2640
2640
  # source://rbnacl//lib/rbnacl/simple_box.rb#80
2641
2641
  def encrypt(message); end
2642
2642
 
2643
- # source://forwardable/1.3.2/forwardable.rb#229
2643
+ # source://forwardable/1.3.3/forwardable.rb#231
2644
2644
  def nonce_bytes(*args, **_arg1, &block); end
2645
2645
 
2646
2646
  # Decrypts the ciphertext with a random nonce
@@ -2655,7 +2655,7 @@ class RbNaCl::SimpleBox
2655
2655
  # source://rbnacl//lib/rbnacl/simple_box.rb#97
2656
2656
  def open(enciphered_message); end
2657
2657
 
2658
- # source://forwardable/1.3.2/forwardable.rb#229
2658
+ # source://forwardable/1.3.3/forwardable.rb#231
2659
2659
  def primitive(*args, **_arg1, &block); end
2660
2660
 
2661
2661
  private
@@ -4,6 +4,16 @@
4
4
  # This is an autogenerated file for types exported from the `rspec-core` gem.
5
5
  # Please instead update this file by running `bin/tapioca gem rspec-core`.
6
6
 
7
+ module ERB::Escape
8
+ private
9
+
10
+ def html_escape(_arg0); end
11
+
12
+ class << self
13
+ def html_escape(_arg0); end
14
+ end
15
+ end
16
+
7
17
  # Namespace for all core RSpec code.
8
18
  #
9
19
  # source://rspec-core//lib/rspec/core/version.rb#1
@@ -647,7 +657,7 @@ class RSpec::Core::Configuration
647
657
 
648
658
  # Set regular expressions used to exclude lines in backtrace.
649
659
  #
650
- # @param patterns [Array<Regexp>] set backtrace_formatter exlusion_patterns
660
+ # @param patterns [Array<Regexp>] set backtrace_formatter exclusion_patterns
651
661
  #
652
662
  # source://rspec-core//lib/rspec/core/configuration.rb#682
653
663
  def backtrace_exclusion_patterns=(patterns); end
@@ -954,7 +964,7 @@ class RSpec::Core::Configuration
954
964
  # if the user is using those (either explicitly or implicitly
955
965
  # by not setting `mock_with` or `expect_with` to anything else).
956
966
  # @note If the user uses this options with `mock_with :mocha`
957
- # (or similiar) they will still have monkey patching active
967
+ # (or similar) they will still have monkey patching active
958
968
  # in their test environment from mocha.
959
969
  #
960
970
  # source://rspec-core//lib/rspec/core/configuration.rb#1846
@@ -4298,7 +4308,7 @@ end
4298
4308
  # were loaded but not executed (due to filtering, `--fail-fast`
4299
4309
  # or whatever) should have a `:status` of `UNKNOWN_STATUS`.
4300
4310
  #
4301
- # This willl produce a new list that:
4311
+ # This will produce a new list that:
4302
4312
  # - Will be missing examples from previous runs that we know for sure
4303
4313
  # no longer exist.
4304
4314
  # - Will have the latest known status for any examples that either
@@ -4638,7 +4648,7 @@ end
4638
4648
  #
4639
4649
  # This is ideal for use by a example or example group, which may
4640
4650
  # be updated multiple times with globally configured hooks, etc,
4641
- # but will not be queried frequently by other examples or examle
4651
+ # but will not be queried frequently by other examples or example
4642
4652
  # groups.
4643
4653
  #
4644
4654
  # @private
@@ -5679,6 +5689,7 @@ end
5679
5689
  #
5680
5690
  # source://rspec-core//lib/rspec/core/formatters/html_printer.rb#7
5681
5691
  class RSpec::Core::Formatters::HtmlPrinter
5692
+ include ::ERB::Escape
5682
5693
  include ::ERB::Util
5683
5694
 
5684
5695
  # @return [HtmlPrinter] a new instance of HtmlPrinter
@@ -8118,7 +8129,7 @@ end
8118
8129
  # individual spec has multiple exceptions, such as one in the `it` block
8119
8130
  # and one in an `after` block.
8120
8131
  #
8121
- # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#436
8132
+ # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#431
8122
8133
  class RSpec::Core::MultipleExceptionError < ::StandardError
8123
8134
  include ::RSpec::Core::MultipleExceptionError::InterfaceTag
8124
8135
 
@@ -8211,7 +8222,7 @@ module RSpec::Core::Notifications; end
8211
8222
  # other registered listeners, it creates attributes based on supplied hash
8212
8223
  # of options.
8213
8224
  #
8214
- # source://rspec-core//lib/rspec/core/notifications.rb#514
8225
+ # source://rspec-core//lib/rspec/core/notifications.rb#510
8215
8226
  class RSpec::Core::Notifications::CustomNotification < ::Struct
8216
8227
  class << self
8217
8228
  # Build a custom notification based on the supplied option key / values.
@@ -9103,21 +9114,12 @@ class RSpec::Core::OutputWrapper
9103
9114
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9104
9115
  def autoclose?(*args, &block); end
9105
9116
 
9106
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9107
- def beep(*args, &block); end
9108
-
9109
9117
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9110
9118
  def binmode(*args, &block); end
9111
9119
 
9112
9120
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9113
9121
  def binmode?(*args, &block); end
9114
9122
 
9115
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9116
- def check_winsize_changed(*args, &block); end
9117
-
9118
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9119
- def clear_screen(*args, &block); end
9120
-
9121
9123
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9122
9124
  def close(*args, &block); end
9123
9125
 
@@ -9136,36 +9138,6 @@ class RSpec::Core::OutputWrapper
9136
9138
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9137
9139
  def closed?(*args, &block); end
9138
9140
 
9139
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9140
- def console_mode(*args, &block); end
9141
-
9142
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9143
- def console_mode=(*args, &block); end
9144
-
9145
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9146
- def cooked(*args, &block); end
9147
-
9148
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9149
- def cooked!(*args, &block); end
9150
-
9151
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9152
- def cursor(*args, &block); end
9153
-
9154
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9155
- def cursor=(*args, &block); end
9156
-
9157
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9158
- def cursor_down(*args, &block); end
9159
-
9160
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9161
- def cursor_left(*args, &block); end
9162
-
9163
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9164
- def cursor_right(*args, &block); end
9165
-
9166
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9167
- def cursor_up(*args, &block); end
9168
-
9169
9141
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9170
9142
  def each(*args, &block); end
9171
9143
 
@@ -9181,24 +9153,12 @@ class RSpec::Core::OutputWrapper
9181
9153
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9182
9154
  def each_line(*args, &block); end
9183
9155
 
9184
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9185
- def echo=(*args, &block); end
9186
-
9187
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9188
- def echo?(*args, &block); end
9189
-
9190
9156
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9191
9157
  def eof(*args, &block); end
9192
9158
 
9193
9159
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9194
9160
  def eof?(*args, &block); end
9195
9161
 
9196
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9197
- def erase_line(*args, &block); end
9198
-
9199
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9200
- def erase_screen(*args, &block); end
9201
-
9202
9162
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9203
9163
  def external_encoding(*args, &block); end
9204
9164
 
@@ -9223,24 +9183,9 @@ class RSpec::Core::OutputWrapper
9223
9183
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9224
9184
  def getc(*args, &block); end
9225
9185
 
9226
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9227
- def getch(*args, &block); end
9228
-
9229
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9230
- def getpass(*args, &block); end
9231
-
9232
9186
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9233
9187
  def gets(*args, &block); end
9234
9188
 
9235
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9236
- def goto(*args, &block); end
9237
-
9238
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9239
- def goto_column(*args, &block); end
9240
-
9241
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9242
- def iflush(*args, &block); end
9243
-
9244
9189
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9245
9190
  def inspect(*args, &block); end
9246
9191
 
@@ -9250,9 +9195,6 @@ class RSpec::Core::OutputWrapper
9250
9195
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9251
9196
  def ioctl(*args, &block); end
9252
9197
 
9253
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9254
- def ioflush(*args, &block); end
9255
-
9256
9198
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9257
9199
  def isatty(*args, &block); end
9258
9200
 
@@ -9265,24 +9207,9 @@ class RSpec::Core::OutputWrapper
9265
9207
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#17
9266
9208
  def method_missing(name, *args, &block); end
9267
9209
 
9268
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9269
- def noecho(*args, &block); end
9270
-
9271
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9272
- def nonblock(*args, &block); end
9273
-
9274
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9275
- def nonblock=(*args, &block); end
9276
-
9277
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9278
- def nonblock?(*args, &block); end
9279
-
9280
9210
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9281
9211
  def nread(*args, &block); end
9282
9212
 
9283
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9284
- def oflush(*args, &block); end
9285
-
9286
9213
  # @private
9287
9214
  #
9288
9215
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#6
@@ -9293,6 +9220,9 @@ class RSpec::Core::OutputWrapper
9293
9220
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#6
9294
9221
  def output=(_arg0); end
9295
9222
 
9223
+ # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9224
+ def path(*args, &block); end
9225
+
9296
9226
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9297
9227
  def pathconf(*args, &block); end
9298
9228
 
@@ -9308,9 +9238,6 @@ class RSpec::Core::OutputWrapper
9308
9238
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9309
9239
  def pread(*args, &block); end
9310
9240
 
9311
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9312
- def pressed?(*args, &block); end
9313
-
9314
9241
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9315
9242
  def print(*args, &block); end
9316
9243
 
@@ -9326,12 +9253,6 @@ class RSpec::Core::OutputWrapper
9326
9253
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9327
9254
  def pwrite(*args, &block); end
9328
9255
 
9329
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9330
- def raw(*args, &block); end
9331
-
9332
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9333
- def raw!(*args, &block); end
9334
-
9335
9256
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9336
9257
  def read(*args, &block); end
9337
9258
 
@@ -9367,12 +9288,6 @@ class RSpec::Core::OutputWrapper
9367
9288
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9368
9289
  def rewind(*args, &block); end
9369
9290
 
9370
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9371
- def scroll_backward(*args, &block); end
9372
-
9373
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9374
- def scroll_forward(*args, &block); end
9375
-
9376
9291
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9377
9292
  def seek(*args, &block); end
9378
9293
 
@@ -9403,12 +9318,21 @@ class RSpec::Core::OutputWrapper
9403
9318
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9404
9319
  def tell(*args, &block); end
9405
9320
 
9321
+ # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9322
+ def timeout(*args, &block); end
9323
+
9324
+ # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9325
+ def timeout=(*args, &block); end
9326
+
9406
9327
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9407
9328
  def to_i(*args, &block); end
9408
9329
 
9409
9330
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9410
9331
  def to_io(*args, &block); end
9411
9332
 
9333
+ # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9334
+ def to_path(*args, &block); end
9335
+
9412
9336
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9413
9337
  def tty?(*args, &block); end
9414
9338
 
@@ -9430,12 +9354,6 @@ class RSpec::Core::OutputWrapper
9430
9354
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9431
9355
  def wait_writable(*args, &block); end
9432
9356
 
9433
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9434
- def winsize(*args, &block); end
9435
-
9436
- # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9437
- def winsize=(*args, &block); end
9438
-
9439
9357
  # source://rspec-core//lib/rspec/core/output_wrapper.rb#23
9440
9358
  def write(*args, &block); end
9441
9359
 
@@ -9755,7 +9673,7 @@ class RSpec::Core::Reporter
9755
9673
  # Registers a listener to a list of notifications. The reporter will send
9756
9674
  # notification of events to all registered listeners.
9757
9675
  #
9758
- # @param listener [Object] An obect that wishes to be notified of reporter
9676
+ # @param listener [Object] An object that wishes to be notified of reporter
9759
9677
  # events
9760
9678
  # @param notifications [Array] Array of symbols represents the events a
9761
9679
  # listener wishes to subscribe too
@@ -10404,7 +10322,7 @@ end
10404
10322
  # eval'd when the `SharedExampleGroupModule` instance is included in an example
10405
10323
  # group.
10406
10324
  #
10407
- # source://rspec-core//lib/rspec/core/shared_example_group.rb#10
10325
+ # source://rspec-core//lib/rspec/core/shared_example_group.rb#9
10408
10326
  class RSpec::Core::SharedExampleGroupModule < ::Module
10409
10327
  # @return [SharedExampleGroupModule] a new instance of SharedExampleGroupModule
10410
10328
  #