Class: OpenPGP::Packet::IntegrityProtectedData

Inherits:
  • Object
show all
Defined in:
lib/openpgp/packet.rb

Overview

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

See Also:

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Methods inherited from

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

Constructor Details

This class inherits a constructor from OpenPGP::Packet

Instance Attribute Details

- (Object) version

Returns the value of attribute version



474
475
476
# File 'lib/openpgp/packet.rb', line 474

def version
  @version
end

Class Method Details

+ (Object) parse_body(body, options = {})



476
477
478
479
480
481
482
483
# File 'lib/openpgp/packet.rb', line 476

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