<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package PGP::Packet::Userid;

use strict;
use vars qw(@ISA);

@ISA = qw(PGP::Packet);

sub new {
    my ($classname, $bodyref, $packetref) = @_;

    bless $classname-&gt;SUPER::new(13, $bodyref, $packetref), $classname;
}

sub name {
    my ($self) = @_;

    return($ {$self-&gt;{"bodyref"}});
}

sub hashdata {
    my ($self, $version) = @_;
    
    if ($version &lt;= 3) {
	return(pack("n", length($ {$self-&gt;bodyref}).
		    $ {$self-&gt;bodyref}));
    } elsif ($version == 4) {
	return("\xb4".
	       pack("N", length($ {$self-&gt;bodyref}).
		    $ {$self-&gt;bodyref}));
    };
}

1;
</pre></body></html>