Class: ZSteg::Checker::SteganographyPNG::Result
- Inherits:
-
Object
- Object
- ZSteg::Checker::SteganographyPNG::Result
- Defined in:
- lib/zsteg/checker/steganography_png.rb
Overview
The secret metadata is stored in the last bytes of the last scanline in the form of:
17 107 [bitloss] [secret size - 4 bytes] [secret type] [secret type length]
17 107 1 4096 "text/plain" 10
Instance Method Summary collapse
Instance Method Details
#to_s ⇒ Object
19 20 21 |
# File 'lib/zsteg/checker/steganography_png.rb', line 19 def to_s super.sub('#<struct ZSteg::Checker::SteganographyPNG::Result', 'SteganographyPNG').sub(/>$/,'').bright_red end |
#valid? ⇒ Boolean
15 16 17 |
# File 'lib/zsteg/checker/steganography_png.rb', line 15 def valid? magic == 0x116b && (1..8).include?(bitloss) end |