Server IP : 172.67.216.182 / Your IP : 162.158.190.93 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/perl5/Authen/SASL/Perl/ |
Upload File : |
# Copyright (c) 2002 Graham Barr <[email protected]>. All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. package Authen::SASL::Perl::CRAM_MD5; use strict; use vars qw($VERSION @ISA); use Digest::HMAC_MD5 qw(hmac_md5_hex); $VERSION = "2.14"; @ISA = qw(Authen::SASL::Perl); my %secflags = ( noplaintext => 1, noanonymous => 1, ); sub _order { 2 } sub _secflags { shift; scalar grep { $secflags{$_} } @_; } sub mechanism { 'CRAM-MD5' } sub client_start { ''; } sub client_step { my ($self, $string) = @_; my ($user, $pass) = map { my $v = $self->_call($_); defined($v) ? $v : '' } qw(user pass); $user . " " . hmac_md5_hex($string,$pass); } 1; __END__ =head1 NAME Authen::SASL::Perl::CRAM_MD5 - CRAM MD5 Authentication class =head1 SYNOPSIS use Authen::SASL qw(Perl); $sasl = Authen::SASL->new( mechanism => 'CRAM-MD5', callback => { user => $user, pass => $pass }, ); =head1 DESCRIPTION This method implements the client part of the CRAM-MD5 SASL algorithm, as described in RFC 2195 resp. in IETF Draft draft-ietf-sasl-crammd5-XX.txt. =head2 CALLBACK The callbacks used are: =over 4 =item user The username to be used for authentication =item pass The user's password to be used for authentication =back =head1 SEE ALSO L<Authen::SASL>, L<Authen::SASL::Perl> =head1 AUTHORS Software written by Graham Barr <[email protected]>, documentation written by Peter Marschall <[email protected]>. Please report any bugs, or post any suggestions, to the perl-ldap mailing list <[email protected]> =head1 COPYRIGHT Copyright (c) 2002-2004 Graham Barr. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Documentation Copyright (c) 2004 Peter Marschall. All rights reserved. This documentation is distributed, and may be redistributed, under the same terms as Perl itself. =cut