1# Fingerprint.pm 2# - providing an object-oriented approach to GnuPG key fingerprints 3# 4# Copyright (C) 2000 Frank J. Tobin <ftobin@cpan.org> 5# 6# This module is free software; you can redistribute it and/or modify it 7# under the same terms as Perl itself. 8# 9# This program is distributed in the hope that it will be useful, 10# but WITHOUT ANY WARRANTY; without even the implied warranty of 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12# 13# $Id: Fingerprint.pm,v 1.8 2001/08/21 13:31:50 ftobin Exp $ 14# 15 16package GnuPG::Fingerprint; 17 18use strict; 19 20use Class::MethodMaker 21 get_set => [ qw( as_hex_string ) ], 22 new_hash_init => 'new'; 23 24# DEPRECATED 25sub hex_data 26{ 27 my ( $self, $v ) = @_; 28 $self->as_hex_string( $v ) if defined $v; 29 return $self->as_hex_string(); 30} 31 321; 33 34__END__ 35 36=head1 NAME 37 38GnuPG::Fingerprint - GnuPG Fingerprint Objects 39 40=head1 SYNOPSIS 41 42 # assumes a GnuPG::Key in $key 43 my $fingerprint = $key->fingerprint->as_hex_string(); 44 45=head1 DESCRIPTION 46 47GnuPG::Fingerprint objects are generally part of GnuPG::Key 48objects, and are not created on their own. 49 50=head1 OBJECT METHODS 51 52=head2 Initialization Methods 53 54=over 4 55 56=item new( I<%initialization_args> ) 57 58This methods creates a new object. The optional arguments are 59initialization of data members; the initialization is done 60in a manner according to the method created as described 61in L<Class::MethodMaker/"new_hash_init">. 62 63=item hash_init( I<%args> ). 64 65This method works as described in L<Class::MethodMaker/"new_hash_init">. 66 67=back 68 69=head1 OBJECT DATA MEMBERS 70 71Note that these data members are interacted with via object methods 72created using the methods described in L<Class::MethodMaker/"get_set">, 73or L<Class::MethodMaker/"object">. 74Please read there for more information. 75 76=over 4 77 78=item as_hex_string 79 80This is the hex value of the fingerprint that the object embodies, 81in string format. 82 83=back 84 85=head1 SEE ALSO 86 87L<GnuPG::Key>, 88L<Class::MethodMaker> 89 90=cut 91