File: compat_pl

package info (click to toggle)
libauthen-sasl-perl 2.08-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 172 kB
  • ctags: 123
  • sloc: perl: 939; makefile: 34
file content (18 lines) | stat: -rwxr-xr-x 367 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env perl 

# short script to check compatability with previous Authen::SASL library

use lib 'lib';
use Authen::SASL;

my $sasl = Authen::SASL->new('CRAM-MD5', password => 'fred');

$sasl->user('gbarr');

$initial = $sasl->initial;
$mech = $sasl->name;

print "$mech;", unpack("H*",$initial),";\n";

print unpack "H*", $sasl->challenge('xyz');
print "\n";