Class: openpgp_packet_onepasssignature

openpgp_packet_onepasssignature

Implementation of the One-Pass Signature Packets (Tag 4) RFC4880 5.4: The One-Pass Signature packet precedes the signed data and contains enough information to allow the receiver to begin calculating any hashes needed to verify the signature. It allows the Signature packet to be placed at the end of the message, so that the signer can compute the entire signed message in one pass.

new openpgp_packet_onepasssignature()

Source:

Methods

<inner> read_packet(input, position, len) → {openpgp_packet_encrypteddata}

parsing function for a one-pass signature packet (tag 4).
Parameters:
Name Type Description
input String payload of a tag 4 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:
Returns:
object representation
Type
openpgp_packet_encrypteddata

<inner> toString() → {String}

generates debug output (pretty print)
Source:
Returns:
String which gives some information about the one-pass signature packet
Type
String

<inner> write_packet(type, hashalgorithm, privatekey, length, nested) → {String}

creates a string representation of a one-pass signature packet
Parameters:
Name Type Description
type Integer Signature types as described in RFC4880 Section 5.2.1.
hashalgorithm Integer the hash algorithm used within the signature
privatekey openpgp_msg_privatekey the private key used to generate the signature
length Integer length of data to be signed
nested boolean boolean showing whether the signature is nested. "true" indicates that the next packet is another One-Pass Signature packet that describes another signature to be applied to the same message data.
Source:
Returns:
a string representation of a one-pass signature packet
Type
String