Class: OpenPGP::Packet::EncryptedData

Inherits:
OpenPGP::Packet show all
Defined in:
lib/openpgp/packet.rb

Overview

OpenPGP Symmetrically Encrypted Data packet (tag 9).

Instance Attribute Summary collapse

Attributes inherited from OpenPGP::Packet

#size, #tag

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from OpenPGP::Packet

#body, for, parse, parse_new_format, parse_old_format, tag

Constructor Details

#initialize(options = {}, &block) ⇒ EncryptedData

Returns a new instance of EncryptedData.



325
326
327
# File 'lib/openpgp/packet.rb', line 325

def initialize(options = {}, &block)
  super(options, &block)
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



319
320
321
# File 'lib/openpgp/packet.rb', line 319

def data
  @data
end

Class Method Details

.parse_body(body, options = {}) ⇒ Object



321
322
323
# File 'lib/openpgp/packet.rb', line 321

def self.parse_body(body, options = {})
  self.new({:data => body.read}.merge(options))
end

Instance Method Details

#write_body(buffer) ⇒ Object



329
330
331
# File 'lib/openpgp/packet.rb', line 329

def write_body(buffer)
  buffer.write(data)
end