get_whole_number(msg, idx, numlen) extracts a “whole number” field of length numlen from msg at index idx returns (<whole number>, new_idx) where the whole number is a long integer and new_idx is the index of the next element in the message
get_whole_int(msg, idx, numlen) same as get_whole_number but returns the number as an int for convenience
pack_long(l) returns big-endian representation of unsigned long integer
pack_mpi(l) returns the PGP Multi-Precision Integer representation of unsigned long integer
get_sig_subpak_len(msg, idx) extracts a signature subpacket length field returns (subpak_len, new_idx)
get_mpi(msg, idx) extracts a multi-precision integer field from the message msg at index idx returns (n, <mpi>, new_idx) where the mpi is a long integer and new_idx is the index of the next element in the message and n is the number of bits of precision in <mpi>
get_mpi(msg, idx) extracts a multi-precision integer field from the message msg at index idx returns (<mpi>, new_idx) where the mpi is a long integer and new_idx is the index of the next element in the message
Bases: yum.pgpmsg.pgp_packet
Bases: yum.pgpmsg.pgp_packet
Bases: yum.pgpmsg.pgp_packet
Bases: yum.pgpmsg.pgp_packet
is_primary_user_id() returns true if this signature contains a primary user id subpacket with value true
Bases: object
load(pkts) Initialize the pgp_certificate with a list of OpenPGP packets. The list of packets will be scanned to make sure they are valid for a pgp certificate.
get_ctb(msg, idx) extracts a the “cypher type bit” information from message msg at index idx returns (type, len, new_idx) where type is the enumerated type of the packet, len is the length of the packet, and new_idx is the index of the next element in the message
decode_msg(msg) ==> list of OpenPGP “packet” objects Takes an ascii-armored PGP block and returns a list of objects each of which corresponds to a PGP “packets”.
A PGP message is a series of packets. You need to understand how packets are to be combined together in order to know what to do with them. For example a PGP “certificate” includes a public key, user id(s), and signature.