lib/tttls1.3/ech.rb
File ech.rb
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
module TTTLS13
using Refinements
SUPPORTED_ECHCONFIG_VERSIONS = ["\xfe\x0d"].freeze
private_constant :SUPPORTED_ECHCONFIG_VERSIONS
Method offer_ech
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.offer_ech(inner, ech_config, hpke_cipher_suite_selector)
return [new_greased_ch(inner, new_grease_ech), nil, nil] \
if ech_config.nil? ||
!SUPPORTED_ECHCONFIG_VERSIONS.include?(ech_config.version)
Method encrypted_ech_config
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.encrypted_ech_config(ech_config, hpke_cipher_suite_selector)
public_name = ech_config.echconfig_contents.public_name
key_config = ech_config.echconfig_contents.key_config
public_key = key_config.public_key.opaque
kem_id = key_config&.kem_id&.uint16
Method new_ch_outer_aad
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def self.new_ch_outer_aad(inner,
cipher_suite,
config_id,
enc,
payload_len,
Method new_ch_outer
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def self.new_ch_outer(aad, cipher_suite, config_id, enc, payload)
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def initialize(maximum_name_length,
config_id,
cipher_suite,
public_name,
ctx)