This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 原始程式來源: http://practicalcryptography.com/ciphers/enigma-cipher/ 網頁內的 javascript 程式碼 | |
| var c = console; | |
| var plaintext = 'ABCDEF'; | |
| c.log('>> plaintext2 : '+plaintext); | |
| var ciphertext = Encrypt(plaintext, 'AAA', 'AAA', '123', 'POMLIUKJNHYTGBVFREDC'); | |
| c.log('>> ciphertext : '+ciphertext); | |
| var plaintext2 = Encrypt(ciphertext, 'AAA', 'AAA', '123', 'POMLIUKJNHYTGBVFREDC'); | |
| c.log('>> plaintext2 : '+plaintext); |