comparison Lib/IMPL/Security/Auth/Simple.pm @ 87:6d3bca490556

small fixes in the security moodules
author wizard
date Mon, 19 Apr 2010 23:20:46 +0400
parents 077357224bec
children 4267a2ac3d46
comparison
equal deleted inserted replaced
86:52eeec77504b 87:6d3bca490556
13 } 13 }
14 14
15 sub CTOR { 15 sub CTOR {
16 my ($this,$secData) = @_; 16 my ($this,$secData) = @_;
17 17
18 my ($passImg,$cookie) = split /|/,$secData; 18 my ($passImg,$cookie) = split /\|/,$secData;
19 19
20 $this->_passwordImage($passImg); 20 $this->_passwordImage($passImg);
21 $this->_sessionCookie($cookie); 21 $this->_sessionCookie($cookie);
22 } 22 }
23 23
62 sub CreateSecData { 62 sub CreateSecData {
63 my ($self,%args) = @_; 63 my ($self,%args) = @_;
64 64
65 die new IMPL::InvalidArgumentException("The parameter is required",'password') unless $args{password}; 65 die new IMPL::InvalidArgumentException("The parameter is required",'password') unless $args{password};
66 66
67 return md5_hex($args{password}); 67 return Digest::MD5::md5_hex($args{password});
68 } 68 }
69 69
70 sub SecDataArgs { 70 sub SecDataArgs {
71 password => 'SCALAR' 71 password => 'SCALAR'
72 } 72 }