Class: ZSteg::Checker::SteganographyPNG::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/zsteg/checker/steganography_png.rb

Overview

github.com/pedrooaugusto/steganography-png/blob/2a0e038c135e41438b4c2c93821227a2289b4203/scanlines/scanlines.go#L234

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_sObject



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

Returns:

  • (Boolean)


15
16
17
# File 'lib/zsteg/checker/steganography_png.rb', line 15

def valid?
  magic == 0x116b && (1..8).include?(bitloss)
end