Class: OpenPGP::Packet::IntegrityProtectedData

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

Overview

OpenPGP Sym. Encrypted Integrity Protected Data packet (tag 18).

Instance Attribute Summary collapse

Attributes inherited from OpenPGP::Packet

#data, #size, #tag

Class Method Summary collapse

Methods inherited from OpenPGP::Packet

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

Constructor Details

This class inherits a constructor from OpenPGP::Packet

Instance Attribute Details

#versionObject

Returns the value of attribute version.


454
455
456
# File 'lib/openpgp/packet.rb', line 454

def version
  @version
end

Class Method Details

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

[View source]

456
457
458
459
460
461
462
463
# File 'lib/openpgp/packet.rb', line 456

def self.parse_body(body, options = {})
  case version = body.read_byte
    when 1
      self.new(:version => version) # TODO: read the encrypted data.
    else
      raise "Invalid OpenPGP integrity-protected data packet version: #{version}"
  end
end