Protocol-OTR

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    Protocol::OTR - Off-the-Record secure messaging protocol

VERSION
    version 0.05

SYNOPSIS
        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');

lib/Protocol/OTR/Channel.pm  view on Meta::CPAN

=head1 VERSION

version 0.05

=head1 SYNOPSIS

    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');

lib/Protocol/OTR/Contact.pm  view on Meta::CPAN

=head1 VERSION

version 0.05

=head1 SYNOPSIS

    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');

lib/Protocol/OTR/Fingerprint.pm  view on Meta::CPAN

=head1 VERSION

version 0.05

=head1 SYNOPSIS

    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');

t/channel.t  view on Meta::CPAN

    my $result = $action->();
    while (my $e = shift @Q) {
        $e->();
    }

    return $result;
}

my $otr = Protocol::OTR->new(
    {
        privkeys_file => "$tmpdir1/otr.private_key",
        contacts_file => "$tmpdir1/otr.fingerprints",
        instance_tags_file => "$tmpdir1/otr.instance_tags",

    }
);

my $otr2 = Protocol::OTR->new(
    {
        privkeys_file => "$tmpdir2/otr.private_key",
        contacts_file => "$tmpdir2/otr.fingerprints",
        instance_tags_file => "$tmpdir2/otr.instance_tags",

    }
);

my ($msg_a2b, $msg_b2a);

my $alice = $otr->account('alice', "protocol");
my $bob = $otr2->account('bob', "protocol");

t/prototypes.t  view on Meta::CPAN


my $tmpdir = tempdir( 'XXXXXXXX', DIR => "t/", CLEANUP => 1 );

eval {
    my $otr = Protocol::OTR->new( [ 123 ]);
};
ok($@, '->new() args are passed as hashref');

my $otr = Protocol::OTR->new(
    {
        privkeys_file => "$tmpdir/otr.private_key",
        contacts_file => "$tmpdir/otr.fingerprints",
        instance_tags_file => "$tmpdir/otr.instance_tags",
    }
);
isa_ok($otr, 'Protocol::OTR');

eval {
    my $act = $otr->account('user@domain');
};
ok($@, 'otr->account() requires protocol');

t/setup.t  view on Meta::CPAN


BEGIN { $ENV{PROTOCOL_OTR_ENABLE_QUICK_RANDOM} = 1 }

use Protocol::OTR qw( :constants );
use File::Temp qw( tempdir );

my $tmpdir = tempdir( 'XXXXXXXX', DIR => "t/", CLEANUP => 1 );

my $otr = Protocol::OTR->new(
    {
        privkeys_file => "$tmpdir/otr.private_key",
        contacts_file => "$tmpdir/otr.fingerprints",
        instance_tags_file => "$tmpdir/otr.instance_tags",
    }
);
isa_ok($otr, 'Protocol::OTR');

my $act = $otr->account('user@domain', 'protocol');

isa_ok($act, 'Protocol::OTR::Account');

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.810 second using v1.00-cache-2.02-grep-82fe00e-cpan-2cc899e4a130 )