Module: Ronin::Support::Encoding::QuotedPrintable
- Defined in:
- lib/ronin/support/encoding/quoted_printable.rb
Overview
Contains methods for encoding/decoding [Quoted Printable] data.
Core-Ext Methods
Class Method Summary collapse
-
.decode(data) ⇒ String
Alias for QuotedPrintable.unescape.
-
.encode(data) ⇒ String
Alias for QuotedPrintable.escape.
-
.escape(data) ⇒ String
Escapes the data as [Quoted-Printable].
-
.unescape(data) ⇒ String
Unescapes a [Quoted-Printable] encoded String.
Class Method Details
.decode(data) ⇒ String
Alias for unescape.
101 102 103 |
# File 'lib/ronin/support/encoding/quoted_printable.rb', line 101 def self.decode(data) unescape(data) end |
.encode(data) ⇒ String
Alias for escape.
67 68 69 |
# File 'lib/ronin/support/encoding/quoted_printable.rb', line 67 def self.encode(data) escape(data) end |
.escape(data) ⇒ String
Escapes the data as Quoted-Printable.
52 53 54 |
# File 'lib/ronin/support/encoding/quoted_printable.rb', line 52 def self.escape(data) [data].pack('M') end |
.unescape(data) ⇒ String
Unescapes a Quoted-Printable encoded String.
86 87 88 |
# File 'lib/ronin/support/encoding/quoted_printable.rb', line 86 def self.unescape(data) data.unpack1('M') end |