Crypt-OTR
view release on metacpan or search on metacpan
Revision history for Perl extension Crypt::OTR.
0.04 Sun Jan 17 2010
- better docs
0.03 Sun Jan 17 2010
- accessors for keyfile and fingerprint file
- cleanup, docs
0.02 Sun Jan 17 2010
- free memory used by callbacks on destruction
- remove some cruft
0.01 Sun Jun 21 09:19:14 2009
- original version; created by h2xs 1.23 with options
-P -g -n Crypt::OTR
Changes
crypt-otr-callbacks.c
crypt-otr-members.c
crypt-otr-perl.c
crypt-otr-private.c
crypt-otr-utils.c
crypt-otr.h
lib/Crypt/OTR.pm
lib/Crypt/OTR/PublicKey.pm
LICENSE
Makefile.PL
MANIFEST
crypt-otr.h view on Meta::CPAN
int crypt_otr_context_to_trust(ConnContext *context);
/* Accessors */
CryptOTRUserState get_state( SV* sv_state );
#include "crypt-otr-utils.c"
#include "crypt-otr-members.c"
#include "crypt-otr-callbacks.c"
#include "crypt-otr-private.c"
#include "crypt-otr-perl.c"
lib/Crypt/OTR.pm view on Meta::CPAN
Crypt::OTR - Off-The-Record encryption library for secure instant
messaging applications
=head1 SYNOPSIS
use Crypt::OTR;
# call near the beginning of your program
Crypt::OTR->init;
# create OTR object, set up callbacks
my $otr = new Crypt::OTR(
account_name => "alice", # name of account associated with this keypair
protocol_name => "my_protocol_name", # e.g. 'AIM'
max_message_size => 1024, # how much to fragment
);
$otr->set_callback('inject' => \&otr_inject);
$otr->set_callback('otr_message' => \&otr_system_message);
$otr->set_callback('verified' => \&otr_verified);
$otr->set_callback('unverified' => \&otr_unverified);
t/Crypt-OTR.t view on Meta::CPAN
# TODO: add tests for fingerprint verification
my $verified_cb = sub {
my($ptr, $username) = @_;
pass("Secure connection established with $username");
lock(%secured);
$secured{ $username } = 1;
};
#### self-explanatory OTR callbacks below
my $disconnected_cb = sub {
my( $ptr, $username ) = @_;
#print "Disconnected\n";
lock( %disconnected );
$disconnected{ $username } = 1;
};
my $error_cb = sub {
my($ptr, $accountname, $protocol, $username, $title, $primary, $secondary) = @_;
t/Crypt-OTR.t view on Meta::CPAN
# this is never reached?
print "Question asked: $question\n";
}
pass("$username requesting SMP shared secret");
lock( %smp_request );
$smp_request{ $username } = 1;
};
# install callbacks
$otr->set_callback('inject' => $inject);
$otr->set_callback('otr_message' => $send_system_message);
$otr->set_callback('verified' => $verified_cb);
$otr->set_callback('unverified' => $unverified_cb);
$otr->set_callback('disconnect' => $disconnected_cb);
$otr->set_callback('still_connected' => $still_connected_cb);
$otr->set_callback('error' => $error_cb);
$otr->set_callback('warning' => $warning_cb);
( run in 2.698 seconds using v1.01-cache-2.11-cpan-9b1e4054eb1 )