Msmgr/User.pm untested

filter: Statementstmt 0.0% 0 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
_fields
2.0
crypto_passwd
2.0
BEGIN
2.0
CRAP 2.0
1 #
2 # $Id: User.pm,v 0.16 2003/08/07 00:01:59 lawrence Exp $
3 #
4  
5 package Net::Msmgr::User;
6 use strict;
7 use warnings;
8 use Digest::MD5;
9 our @ISA = qw (Net::Msmgr::Object);
10  
11  
12 sub _fields { return shift->SUPER::_fields,( salt => undef,
13 user => undef,
14 password => undef ); }
15  
16 =pod
17  
18 =head1 NAME
19  
20 Net::Msmgr::User
21  
22 =head1 SYNOPSIS
23  
24 use Net::Msmgr::User;
25  
26 my $user = Net::Msmgr::User->new(user => 'joeblow@msn.com',
27 password => 'password' );
28  
29 print "Username is: ", $user->user;
30  
31 =head1 DESCRIPTION
32  
33 Net::Msmgr::User is the encapsulation object for a user/password pair.
34  
35 =head1 CONSTRUCTOR
36  
37 my $user = new Net::Msmgr::User ( user => ... );
38  
39 - or -
40  
41 my $user = Net::Msmgr::User->new(user => .... );
42  
43 Constructor parameters are:
44  
45 =over
46  
47 =item user (mandatory)
48  
49 Registered MSN email address.
50  
51 =item password (mandatory)
52  
53 Your password. This is never sent "in the clear"
54  
55 =back
56  
57 =cut
58  
59 =pod
60  
61 =head1 INSTANCE METHODS
62  
63 =over
64  
65 =item $user->crypto_passwd;
66  
67 Returns the MD5 hex digest of the salt, which is assigned during the
68 login authentication process and the user password.
69  
70 =back
71  
72 =cut
73  
74 sub crypto_passwd
75 {
76 my $self = shift;
77 my $d = new Digest::MD5;
78 $d->add($self->{salt} . $self->{password} );
79 return $d->hexdigest;
80 }
81  
82 1;
83  
84 #
85 # $Log: User.pm,v $
86 # Revision 0.16 2003/08/07 00:01:59 lawrence
87 # Initial Release
88 #
89 #