| Crypt :: Ooenigma :: Rotor. Crypt :: Ooenigma¿¡¼ »ç¿ëÇϱâÀ§ÇÑ ·ÎÅÍ °´Ã¼. |
Áö±Ý ´Ù¿î·Îµå |
Crypt :: Ooenigma :: Rotor. ¼øÀ§ ¹× ¿ä¾à
- ƯÇã:
- Perl Artistic License
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- ftp://mama.indstate.edu/linux/tree
Crypt :: Ooenigma :: Rotor. ű×
Crypt :: Ooenigma :: Rotor. ¼³¸í
Crypt :: Ooenigma¿¡¼ »ç¿ëÇϱâÀ§ÇÑ ·ÎÅÍ °´Ã¼. Crypt :: Ooenigma :: Rotor´Â Crypt :: ooenigma.synopsis ³» $ Rotor = Crypt :: Ooenigma :: Rotor-> New (); # ¶Ç´Â $ subhash = {# ¸ðµç a..z A => "z", b => "g", # etc}¿¡ ´ëÇÑ ¾ÏÈ£ÀÇ ´ëü ÄÚµå; ³» $ FREQ = 2; # ȸÀü ´ç ¾ÏÈ£È µÈ ¹®ÀÚ ¼ö My $ start_position = 20; # modulo 26 my $ rotor = crypt :: ooenigma :: Rotor-> new (cipher => $ subhash, freq => $ freq start_position => $ pos); # Enigma Machines : $ Rotor-> init ()¿¡ ÀÇÇÑ ³»ºÎ »ç¿ë # ȸ ÀüÀÚ¸¦ Ãʱ⠻óÅ·ΠµÇµ¹¸³´Ï´Ù. My $ OP = $ Rotor-> Encode ($ some_letter); # Àü´Þ ¹æÇâÀ¸·Î ÆíÁö¸¦ ÀÎÄÚµù $ OP = $ ROTOR-> Revencode ($ some_letter); # ¿ª¹æÇâÀ¸·Î ¹®ÀÚ¸¦ ÀÎÄÚµùÇÕ´Ï´Ù $ rotor-> next (); # ´ÙÀ½ ÀÎÄÚµù Áغñ, ÇÊ¿äÇÑ $ ·ÎÅÍ -> ȸÀü ()À¸·Î ȸÀüÇϽʽÿÀ. # ´ÙÀ½ À§Ä¡ ¿ä±¸ »çÇ×À¸·Î ȸÀüÇÕ´Ï´Ù. ¡¤ Perl.
Crypt :: Ooenigma :: Rotor. °ü·Ã ¼ÒÇÁÆ®¿þ¾î