NAME

pg_hmac.pl - Nordea PlusGirot HMAC algorithm


SYNOPSIS

pg_hmac.pl <options>


OPTIONS

 <--keyfile <filename>>
   key to seal with, 128 bit key encoded in hex
 [--infile <filename>] 
   file to seal ( if not set stdin )
 [--outfile <filename>]
   sealed file ( if not set stdout )
 [--date <YYMMDD>]
   added in the File Header record
   if not set the date of the execution is set
 [--transmission]
   add transmission records %001 %002
    
 [--test]   
   execute a self test
 [--help]
   display help and usage information


DESCRIPTION

   pg_hmac.pl implements functionality to seal a file to
   be sent to Nordea PlusGirot
   See the following urls
   http://www.plusgirot.se/Programleverantörer/Kommunikation+och+säkerhet/HMAC/1088002.html
   
   
   This is similar to the BGC HMAC
   For more information about BGC HMAC, 
   visit the website www.bgc.se/hmac 
   
   The source code is in charset encoding ISO-8859-1
   
   The files that should be sealed should be in 
   charset encoding ISO-8859-1
   
   The line separator should be CRLF for the files to be sealed
   The command "cpanp" (CPANPLUS) may be used in cygwin 
   to install the Digest::SHA perl module
   Tripple check your keyfile, it should not contain CRLF 
   and have the correct length
   Note that this program doesn't add the 
   %001 Transmissopn header
   %002 Transmission trailer


EXIT CODES

   0 success
   anything else indicates failure


EXAMPLES

 if executed from within Eclipse
 using EPIC
 using cygwin perl
 the arguments may look like this
 --infile /cygdrive/c/Users/frost/workspace/bgc_hmac/src/pgin.txt 
 --keyfile /cygdrive/c/Users/frost/workspace/bgc_hmac/src/key.txt 
 --outfile /cygdrive/c/Users/frost/workspace/bgc_hmac/src/pgout.txt


LICENSE

 This code is licensed under any of the following


COPYRIGHT

   pg_hmac.pl is Copyright (C) 2011 Otto Frost


AUTHOR

 Otto Frost
 email: hotmail.com 
 username@hotmail.com: ecsfros
 fool the spammers...
 And the home page from 1994 
 http://www.df.lth.se/~frost


JAVA

 A java version may be constructed upon request, but not for free.
 Contact the author for more information.


ACKNOWLEDGEMENTS

 Larry Wall and the authors of perl for delivering an excellent product
 
 Mark Shelor <mshelor@cpan.org> for providing 
 the Digest::SHA perl module


OTHERS

 use utf8; # tell perl the source is in UTF-8, 
 don't do this for bgc_hmac.pl but
 instead keep the source in ISO-8859-1
 This code has been tested with
 http://search.cpan.org/~mshelor/Digest-SHA-5.50/lib/Digest/SHA.pm
 
 $ perl --version
 This is perl, v5.10.1 (*) built for i686-cygwin-thread-multi-64int
 (with 13 registered patches, see perl -V for more detail)
 Copyright 1987-2009, Larry Wall
 Perl may be copied only under the terms of either 
 the Artistic License or the GNU General Public License, 
 which may be found in the Perl 5 source kit.
 Complete documentation for Perl, including FAQ lists, 
 should be found on this system using "man perl" or "perldoc perl".  
 If you have access to the Internet, point your 
 browser at http://www.perl.org/, the Perl Home Page.
 Windows Vista Business Edition
 Development has been done on the Eclipse IDE using the EPIC plugin
 Eclipse IDE for Java EE Developers     1.2.2.20100217-2310     epp.package.jee
 EPIC   0.5.46  org.epic.feature.main.feature.group