Playfair cipher: Difference between revisions
Content deleted Content added
m →{{header|REXX}}: added a link to CHANGESTR.REX for use by older REXXes. -- ~~~~ |
m →{{header|REXX}}: adjusted REXX program for the case of no arg before the ( not followed by a blank. -- ~~~~ |
||
Line 365: | Line 365: | ||
<br>Also added a a fair amount of code to massage the decrypted encryption to remove doubled '''X'''es so as to match the original text. |
<br>Also added a a fair amount of code to massage the decrypted encryption to remove doubled '''X'''es so as to match the original text. |
||
<lang rexx>/*REXX program implements a PLAYFAIR cipher (encryption & decryption).*/ |
<lang rexx>/*REXX program implements a PLAYFAIR cipher (encryption & decryption).*/ |
||
parse arg key |
parse arg key omit _ . '(' text; /*TEXT is the phrase to be used. */ oldK=key |
||
if key =='' | key ==',' then do; key='Playfair example.'; oldK=key " ◄───using the default."; end |
if key =='' | key ==',' then do; key='Playfair example.'; oldK=key " ◄───using the default."; end |
||
if omit=='' | omit==',' then omit='J' /*the "omitted" character. */ |
if omit=='' | omit==',' then omit='J' /*the "omitted" character. */ |