Protocol::OTR::Fingerprint - Off-the-Record contact's Fingerprint
version 0.05
use Protocol::OTR qw( :constants ); my $otr = Protocol::OTR->new( { privkeys_file => "otr.private_key", contacts_file => "otr.fingerprints", instance_tags_file => "otr.instance_tags", } ); # find or create account my $alice = $otr->account('alice@domain', 'prpl-jabber'); # find or create contact known by $alice my $bob = $alice->contact('bob@domain'); # return all $bob's fingerprints for my $fingerprint ( $bob->fingerprints() ) { print "Fingerprint:\n"; print " * hash: ", $fingerprint->hash, "\n"; print " * status: ", $fingerprint->status, "\n"; print " * is_verified: ", $fingerprint->is_verified, "\n"; }
Protocol::OTR::Fingerprint represents the fingerprint for OTR contact.
my $contact = $fingerprint->contact();
Returns fingerprint's Protocol::OTR::Contact object.
my $hash = $fingerprint->hash();
Returns fingerprint's hash in human readable format 12345678 90ABCDEF 12345678 90ABCDEF 12345678.
12345678 90ABCDEF 12345678 90ABCDEF 12345678
my $status = $fingerprint->status;
Returns current status of fingerprint used in communication, which is one of:
Unused
Not private
Unverified
Private
Finished
my $is_verified = $fingerprint->is_verified;
Returns true if current fingerprint is verified, false otherwise.
$fingerprint->set_verified( $true_or_false );
Sets fingerprint as verified or not.
Protocol::OTR
Protocol::OTR::Account
Protocol::OTR::Contact
Protocol::OTR::Fingerprint
Protocol::OTR::Channel
Alex J. G. Burzyński <ajgb@cpan.org>
This software is copyright (c) 2014 by Alex J. G. Burzyński <ajgb@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Protocol::OTR, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Protocol::OTR
CPAN shell
perl -MCPAN -e shell install Protocol::OTR
For more information on module installation, please visit the detailed CPAN module installation guide.