Class: ZSteg::Result::Camouflage

Inherits:
Struct
  • Object
show all
Defined in:
lib/zsteg/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Camouflage

Returns a new instance of Camouflage.



68
69
70
71
72
73
74
# File 'lib/zsteg/result.rb', line 68

def initialize(data)
  self.hidden_data_len = (data[0x1a,4] || '').unpack('V').first
  if data.size > 300 && data[-4,4] == "\x20\x20\x20\x20"
    # orignal length of host file
    self.host_orig_len = data[-281,4].unpack('V').first
  end
end

Instance Attribute Details

#hidden_data_lenObject

Returns the value of attribute hidden_data_len

Returns:

  • (Object)

    the current value of hidden_data_len



67
68
69
# File 'lib/zsteg/result.rb', line 67

def hidden_data_len
  @hidden_data_len
end

#host_orig_lenObject

Returns the value of attribute host_orig_len

Returns:

  • (Object)

    the current value of host_orig_len



67
68
69
# File 'lib/zsteg/result.rb', line 67

def host_orig_len
  @host_orig_len
end

Instance Method Details

#to_sObject



76
77
78
# File 'lib/zsteg/result.rb', line 76

def to_s
  super.bright_red
end