ech_config 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/.rubocop.yml +9 -11
- data/.ruby-version +1 -1
- data/Gemfile +4 -6
- data/Gemfile.lock +201 -48
- data/README.md +1 -1
- data/Rakefile +11 -5
- data/Steepfile +8 -0
- data/ech_config.gemspec +7 -4
- data/example/README.md +1 -1
- data/lib/ech_config/ech_config_contents/extensions.rb +7 -5
- data/lib/ech_config/ech_config_contents/hpke_key_config/hpke_kem_id.rb +11 -6
- data/lib/ech_config/ech_config_contents/hpke_key_config/hpke_public_key.rb +7 -4
- data/lib/ech_config/ech_config_contents/hpke_key_config/hpke_symmetric_cipher_suite/hpke_aead_id.rb +11 -6
- data/lib/ech_config/ech_config_contents/hpke_key_config/hpke_symmetric_cipher_suite/hpke_kdf_id.rb +11 -6
- data/lib/ech_config/ech_config_contents/hpke_key_config/hpke_symmetric_cipher_suite.rb +11 -6
- data/lib/ech_config/ech_config_contents/hpke_key_config.rb +16 -18
- data/lib/ech_config/ech_config_contents.rb +15 -17
- data/lib/ech_config/error.rb +2 -1
- data/lib/ech_config/version.rb +3 -2
- data/lib/ech_config.rb +39 -14
- data/sig/generated/ech_config/ech_config_contents/extensions.rbs +16 -0
- data/sig/generated/ech_config/ech_config_contents/hpke_key_config/hpke_kem_id.rbs +20 -0
- data/sig/generated/ech_config/ech_config_contents/hpke_key_config/hpke_public_key.rbs +16 -0
- data/sig/generated/ech_config/ech_config_contents/hpke_key_config/hpke_symmetric_cipher_suite/hpke_aead_id.rbs +20 -0
- data/sig/generated/ech_config/ech_config_contents/hpke_key_config/hpke_symmetric_cipher_suite/hpke_kdf_id.rbs +20 -0
- data/sig/generated/ech_config/ech_config_contents/hpke_key_config/hpke_symmetric_cipher_suite.rbs +26 -0
- data/sig/generated/ech_config/ech_config_contents/hpke_key_config.rbs +31 -0
- data/sig/generated/ech_config/ech_config_contents.rbs +31 -0
- data/sig/generated/ech_config/error.rbs +13 -0
- data/sig/generated/ech_config/version.rbs +5 -0
- data/sig/generated/ech_config.rbs +35 -0
- metadata +18 -46
- data/.github/workflows/ci.yml +0 -34
- data/.gitignore +0 -16
- data/sorbet/config +0 -3
- data/sorbet/rbi/gems/ast.rbi +0 -49
- data/sorbet/rbi/gems/byebug.rbi +0 -1041
- data/sorbet/rbi/gems/ech_config.rbi +0 -22
- data/sorbet/rbi/gems/parallel.rbi +0 -84
- data/sorbet/rbi/gems/parser.rbi +0 -1533
- data/sorbet/rbi/gems/racc.rbi +0 -43
- data/sorbet/rbi/gems/rainbow.rbi +0 -122
- data/sorbet/rbi/gems/rake.rbi +0 -647
- data/sorbet/rbi/gems/regexp_parser.rbi +0 -1026
- data/sorbet/rbi/gems/rexml.rbi +0 -603
- data/sorbet/rbi/gems/rspec-core.rbi +0 -1947
- data/sorbet/rbi/gems/rspec-expectations.rbi +0 -1178
- data/sorbet/rbi/gems/rspec-mocks.rbi +0 -1096
- data/sorbet/rbi/gems/rspec-support.rbi +0 -282
- data/sorbet/rbi/gems/rspec.rbi +0 -15
- data/sorbet/rbi/gems/rubocop-ast.rbi +0 -1404
- data/sorbet/rbi/gems/rubocop-sorbet.rbi +0 -312
- data/sorbet/rbi/gems/rubocop.rbi +0 -9351
- data/sorbet/rbi/gems/ruby-progressbar.rbi +0 -321
- data/sorbet/rbi/gems/unicode-display_width.rbi +0 -23
- data/sorbet/rbi/gems/webrick.rbi +0 -667
- data/sorbet/rbi/hidden-definitions/errors.txt +0 -23073
- data/sorbet/rbi/hidden-definitions/hidden.rbi +0 -12232
- data/sorbet/rbi/sorbet-typed/lib/rainbow/all/rainbow.rbi +0 -276
- data/sorbet/rbi/sorbet-typed/lib/rake/all/rake.rbi +0 -645
- data/sorbet/rbi/sorbet-typed/lib/rspec-core/all/rspec-core.rbi +0 -24
- data/sorbet/rbi/sorbet-typed/lib/rubocop/>=1.8/rubocop.rbi +0 -12
- data/sorbet/rbi/todo.rbi +0 -6
- data/spec/ech_config_spec.rb +0 -35
- data/spec/hpke_key_config_spec.rb +0 -31
- data/spec/spec_helper.rb +0 -6
data/spec/ech_config_spec.rb
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# encoding: ascii-8bit
|
|
2
|
-
# typed: false
|
|
3
|
-
# frozen_string_literal: true
|
|
4
|
-
|
|
5
|
-
require_relative 'spec_helper'
|
|
6
|
-
|
|
7
|
-
RSpec.describe ECHConfig do
|
|
8
|
-
context 'valid echconfig octet' do
|
|
9
|
-
let(:octet) do
|
|
10
|
-
<<-BIN.split.map(&:hex).map(&:chr).join
|
|
11
|
-
fe 0d 00 36 00 00 20 00 1e 00 00 00 00 00 00 00
|
|
12
|
-
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
|
13
|
-
00 00 00 00 00 00 00 00 04 00 01 00 01 00 09 6c
|
|
14
|
-
6f 63 61 6c 68 6f 73 74 00 00
|
|
15
|
-
BIN
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
let(:ech_configs) do
|
|
19
|
-
ECHConfig.decode_vectors(octet)
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
it 'should decode' do
|
|
23
|
-
expect(ech_configs.length).to eq 1
|
|
24
|
-
expect(ech_configs.first.version).to eq "\xfe\x0d"
|
|
25
|
-
|
|
26
|
-
key_config = ech_configs.first.echconfig_contents.key_config
|
|
27
|
-
expect(key_config.config_id).to eq 0
|
|
28
|
-
expect(key_config.kem_id.uint16).to eq 0x0020
|
|
29
|
-
expect(key_config.public_key.opaque).to eq "\x00" * 30
|
|
30
|
-
expect(key_config.cipher_suites.length).to eq 1
|
|
31
|
-
expect(key_config.cipher_suites.first.kdf_id.uint16).to eq 0x0001
|
|
32
|
-
expect(key_config.cipher_suites.first.aead_id.uint16).to eq 0x0001
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# encoding: ascii-8bit
|
|
2
|
-
# typed: false
|
|
3
|
-
# frozen_string_literal: true
|
|
4
|
-
|
|
5
|
-
require_relative 'spec_helper'
|
|
6
|
-
|
|
7
|
-
RSpec.describe ECHConfig::ECHConfigContents::HpkeKeyConfig do
|
|
8
|
-
context 'valid hpke_key_config octet' do
|
|
9
|
-
let(:octet) do
|
|
10
|
-
<<-BIN.split.map(&:hex).map(&:chr).join
|
|
11
|
-
ff 00 20 00 1e 00 00 00 00 00 00 00 00 00 00 00
|
|
12
|
-
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
|
13
|
-
00 00 00 00 08 00 01 00 01 00 01 00 03
|
|
14
|
-
BIN
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
let(:hpke_key_config) do
|
|
18
|
-
ECHConfig::ECHConfigContents::HpkeKeyConfig.decode(octet).first
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
it 'should decode' do
|
|
22
|
-
expect(hpke_key_config.config_id).to eq 255
|
|
23
|
-
expect(hpke_key_config.kem_id.uint16).to eq 32
|
|
24
|
-
expect(hpke_key_config.public_key.opaque).to eq "\x00" * 30
|
|
25
|
-
expect(hpke_key_config.cipher_suites[0].kdf_id.uint16).to eq 1
|
|
26
|
-
expect(hpke_key_config.cipher_suites[0].aead_id.uint16).to eq 1
|
|
27
|
-
expect(hpke_key_config.cipher_suites[1].kdf_id.uint16).to eq 1
|
|
28
|
-
expect(hpke_key_config.cipher_suites[1].aead_id.uint16).to eq 3
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|