Class: Stenohttp2::Common::Protocol

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/stenohttp2/common/protocol.rb

Defined Under Namespace

Classes: Decrypter, Encrypter

Instance Method Summary collapse

Instance Method Details

#decode(text) ⇒ Object



20
21
22
# File 'lib/stenohttp2/common/protocol.rb', line 20

def decode(text)
  Decrypter.new.call(text)
end

#decompress_and_decode(message) ⇒ Object



25
26
27
# File 'lib/stenohttp2/common/protocol.rb', line 25

def decompress_and_decode(message)
  decode(message.join.strip)
end

#encode(text) ⇒ Object



15
16
17
# File 'lib/stenohttp2/common/protocol.rb', line 15

def encode(text)
  Encrypter.new.call(text)
end