summaryrefslogtreecommitdiff
path: root/t/simple-enigma.t
blob: 2a42bd59733b48ab0d2439ec0addb1683486ffe0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!perl 
use DAKKAR::p 'test';
use Test::Enigmatic;
use Enigmatic::Machine;
 
sub real_machine {
    return  Enigmatic::Machine->new({
        reflector => 'B_thin',
        rotors => [ 'I''IV''II''Beta' ],
        plugboard => 'AT BL DF GJ HM NW OP QY RZ VX',
        ring_settings => [ 'V''A''A''A' ],
        rotor_positions => [ 'A''N''J''V' ],
    });
}
 
Test::Enigmatic::test_full_machine(
    \&real_machine,
    'this is a simple text to be encrypted by an enigma machine');
 
done_testing();
 
__END__
 
=head1 AUTHOR
 
Gianni Ceccarelli <dakkar@thenautilus.net>
 
=head1 COPYRIGHT AND LICENSE
 
This software is copyright (c) 2011 by Gianni Ceccarelli.
 
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, version 3.
 
=cut