Class: openpgp_packet_userid

openpgp_packet_userid

Implementation of the User ID Packet (Tag 13) A User ID packet consists of UTF-8 text that is intended to represent the name and email address of the key holder. By convention, it includes an RFC 2822 [RFC2822] mail name-addr, but there are no restrictions on its content. The packet length in the header specifies the length of the User ID.

new openpgp_packet_userid()

Source:

Methods

<inner> hasCertificationRevocationSignature(keyId)

lookup function to find certification revocation signatures
Parameters:
Name Type Description
keyId String string containing the key id of the issuer of this signature
Source:
Returns:
a CertificationRevocationSignature if found; otherwise null

<inner> read_nodes(parent_node, input, position, len) → {Integer}

Continue parsing packets belonging to the userid packet such as signatures
Parameters:
Name Type Description
parent_node Object the parent object
input String input string to read the packet(s) from
position Integer start position for the parser
len Integer length of the packet(s) or remaining length of input
Source:
Returns:
length of nodes read
Type
Integer

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

parsing function for a user id packet (tag 13).
Parameters:
Name Type Description
input String payload of a tag 13 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 user id packet
Type
String

<inner> verify()

verifies the signatures of the user id
Source:
Returns:
0 if the userid is valid; 1 = userid expired; 2 = userid revoked

<inner> verifyCertificationSignatures(publicKeyPacket) → {Integer[]}

Verifies all certification signatures. This method does not consider possible revocation signatures.
Parameters:
Name Type Description
publicKeyPacket Object the top level key material
Source:
Returns:
An array of integers corresponding to the array of certification signatures. The meaning of each integer is the following: 0 = bad signature 1 = signature expired 2 = issuer key not available 3 = revoked 4 = signature valid 5 = signature by key owner expired 6 = signature by key owner revoked
Type
Integer[]

<inner> write_packet(user_id) → {String}

creates a string representation of the user id packet
Parameters:
Name Type Description
user_id String the user id as string ("John Doe
Source:
Returns:
string representation
Type
String