Class: OpenPGP::Packet::Signature
- Inherits:
-
OpenPGP::Packet
- Object
- OpenPGP::Packet
- OpenPGP::Packet::Signature
- Defined in:
- lib/openpgp/packet.rb
Overview
OpenPGP Signature packet (tag 2).
Instance Attribute Summary collapse
-
#fields ⇒ Object
Returns the value of attribute fields.
-
#hash_algorithm ⇒ Object
Returns the value of attribute hash_algorithm.
-
#key_algorithm ⇒ Object
Returns the value of attribute key_algorithm.
-
#key_id ⇒ Object
Returns the value of attribute key_id.
-
#type ⇒ Object
Returns the value of attribute type.
-
#version ⇒ Object
Returns the value of attribute version.
Attributes inherited from OpenPGP::Packet
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
#fields ⇒ Object
Returns the value of attribute fields.
127 128 129 |
# File 'lib/openpgp/packet.rb', line 127 def fields @fields end |
#hash_algorithm ⇒ Object
Returns the value of attribute hash_algorithm.
125 126 127 |
# File 'lib/openpgp/packet.rb', line 125 def hash_algorithm @hash_algorithm end |
#key_algorithm ⇒ Object
Returns the value of attribute key_algorithm.
125 126 127 |
# File 'lib/openpgp/packet.rb', line 125 def key_algorithm @key_algorithm end |
#key_id ⇒ Object
Returns the value of attribute key_id.
126 127 128 |
# File 'lib/openpgp/packet.rb', line 126 def key_id @key_id end |
#type ⇒ Object
Returns the value of attribute type.
124 125 126 |
# File 'lib/openpgp/packet.rb', line 124 def type @type end |
#version ⇒ Object
Returns the value of attribute version.
124 125 126 |
# File 'lib/openpgp/packet.rb', line 124 def version @version end |
Class Method Details
.parse_body(body, options = {}) ⇒ Object
129 130 131 132 133 134 135 |
# File 'lib/openpgp/packet.rb', line 129 def self.parse_body(body, = {}) case version = body.read_byte when 3 then self.new(:version => 3).send(:read_v3_signature, body) when 4 then self.new(:version => 4).send(:read_v4_signature, body) else raise "Invalid OpenPGP signature packet version: #{version}" end end |