lib/tttls1.3/message/record.rb
# NOTE:
# serialize joins messages.
# If serialize is received Server Parameters(EE, CT, CV),
# it returns one binary.
#
# @param record_size_limit [Integer]
#
# @return [String]
serialize joins messages.
If serialize is received Server Parameters(EE, CT, CV),
it returns one binary.
serialize joins messages . If serialize is received Server Parameters ( EE CT CV ) it returns one binary .
def serialize(record_size_limit = DEFAULT_RECORD_SIZE_LIMIT)
        tlsplaintext = @messages.map(&:serialize).join + @surplus_binary
        if @cipher.is_a?(Cryptograph::Aead)
          max = @cipher.tlsplaintext_length_limit(record_size_limit)
          fragments = tlsplaintext.scan(/.{1,#{max}}/m)
        else
          fragments = [tlsplaintext]
        end
        fragments.map do |s|
          @type + @legacy_record_version \
          + @cipher.encrypt(s, messages_type).prefix_uint16_length
        end.join
      end
def serialize ( record_size_limit = DEFAULT_RECORD_SIZE_LIMIT ) tlsplaintext = @messages . map ( & :serialize ) . join + @surplus_binary if @cipher . is_a? ( Cryptograph :: Aead ) max = @cipher . tlsplaintext_length_limit ( record_size_limit ) fragments = tlsplaintext . scan ( / .{1, #{ max } } /m ) else fragments = [ tlsplaintext ] end fragments . map do | s | @type + @legacy_record_version + @cipher . encrypt ( s , messages_type ) . prefix_uint16_length end . join end
NOTE:
serialize joins messages.
NOTE : serialize joins messages .
None
String
record_size_limit
None