Crypt::OOEnigma::RotorThe Rotor object for use in Crypt::OOEnigma. | |
Download |
Crypt::OOEnigma::Rotor Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Steve Baker
- Publisher web site:
- ftp://mama.indstate.edu/linux/tree
Crypt::OOEnigma::Rotor Tags
Crypt::OOEnigma::Rotor Description
The Rotor object for use in Crypt::OOEnigma. Crypt::OOEnigma::Rotor is the Rotor object for use in Crypt::OOEnigma.SYNOPSIS my $rotor = Crypt::OOEnigma::Rotor->new(); # OR my $subHash ={ # the substitution code for the cipher for all A..Z A => "Z", B => "G", # etc }; my $freq = 2 ; # The number of letters enciphered per rotation my $start_position = 20 ; # modulo 26 my $rotor = Crypt::OOEnigma::Rotor->new(cipher => $subHash, freq => $freq start_position => $pos); # for internal use by Enigma machines: $rotor->init(); # returns the Rotor to its initial state my $op = $rotor->encode($some_letter); # encode a letter in the forward direction $op = $rotor->revencode($some_letter); # encode a letter in the reverse direction $rotor->next(); # prepare for the next encoding, rotating as required $rotor->rotate(); # rotate to the next position Requirements: · Perl
Crypt::OOEnigma::Rotor Related Software