Class: openpgp_packet_signature

openpgp_packet_signature

Implementation of the Signature Packet (Tag 2) RFC4480 5.2: A Signature packet describes a binding between some public key and some data. The most common signatures are a signature of a file or a block of text, and a signature that is a certification of a User ID.

new openpgp_packet_signature

Source:
  • openpgp.js, line 210

Methods

<inner> getIssuer

gets the issuer key id of this signature
Source:
  • openpgp.js, line 910
Returns:
issuer key id as string (8bytes)
Type
String

<inner> getIssuerKey

Tries to get the corresponding public key out of the public keyring for the issuer created this signature
Source:
  • openpgp.js, line 922
Returns:
if found the public key will be returned. null otherwise
Type
obj: [openpgp_msg_publickey], text: [String]

<inner> read_packet

parsing function for a signature packet (tag 2).
Parameters:
Name Type Description
input string payload of a tag 2 packet
position integer position to start reading from the input string
len integer length of the packet or the remaining length of input at position
Source:
  • openpgp.js, line 260
Returns:
object representation
Type
openpgp_packet_encrypteddata

<inner> toString

generates debug output (pretty print)
Source:
  • openpgp.js, line 852
Returns:
String which gives some information about the signature packet
Type
string

<inner> verify

verifys the signature packet. Note: not signature types are implemented
Parameters:
Name Type Description
data String data which on the signature applies
key openpgp_msg_privatekey the public key to verify the signature
Source:
  • openpgp.js, line 668
Returns:
True if message is verified, else false.
Type
boolean

<inner> write_message_signature

creates a string representation of a message signature packet (tag 2). This can be only used on text data
Parameters:
Name Type Description
signature_type integer should be 1 (one)
data String data to be signed
privatekey openpgp_msg_privatekey private key used to sign the message. (secMPIs MUST be unlocked)
Source:
  • openpgp.js, line 400
Returns:
string representation of a signature packet
Type
string

<inner> write_sub_signature_packet

creates a string representation of a sub signature packet (See RFC 4880 5.2.3.1)
Parameters:
Name Type Description
type integer subpacket signature type. Signature types as described in RFC4880 Section 5.2.3.2
data String data to be included
Source:
  • openpgp.js, line 445
Returns:
a string-representation of a sub signature packet (See RFC 4880 5.2.3.1)
Type
String