#!/usr/bin/perl -w
##################
#
# Testing the Crypt::Enigma module
#
#
##################
use strict;

use Crypt::Enigma;
my ($enigma) = Crypt::Enigma->new();

# Set the enigma to the proper rotor, ring, and initial setting.
$enigma->setup("312", "ABC", "ERZ");

# Plugboard a to b, and b to a.
$enigma->stekker("a", "b");

my $word = "Hello";
my $output;
my @letters = split //, $word;
foreach my $letter (@letters){
    my ($crypt) = $enigma->input($letter);
    $output .= $crypt;
}
print " plain = '$word', crypt = '$output' \n";

