Class: Stenohttp2::Common::Protocol::Decrypter

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

Instance Method Summary collapse

Instance Method Details

#call(text) ⇒ Object



47
48
49
50
51
# File 'lib/stenohttp2/common/protocol.rb', line 47

def call(text)
  data = Base64.strict_decode64(CGI.unescape(text))

  cipher.update(data) + cipher.final
end

#cipherObject



53
54
55
# File 'lib/stenohttp2/common/protocol.rb', line 53

def cipher
  @cipher ||= ::Stenohttp2::Common::CipherBuilder.decryptor
end