#!/usr/bin/perl

# This version of the aes script, which is a wrapper around
# the java program aes.jar, is very careful about arguments
# and path dependencies.  It requires that java is in the path,
# and that aes.jar is in the same directory as this script.

# Set $dirname to directory containing this executing script
use File::Basename;
use File::Spec;
my $dirname = File::Spec->rel2abs(dirname( __FILE__ ));

# create command vector
@comm = ("java","-jar","${dirname}/aes.jar");
push(@comm,@ARGV);

# call command ... this way, shell meta-characters in @comm
# are left unexpanded
system { $comm[0] } @comm;
