Playfair cipher: Difference between revisions

m
→‎{{header|NetRexx}}: reorder args for cipher method
(Add NetRexx implementation)
m (→‎{{header|NetRexx}}: reorder args for cipher method)
Line 240:
 
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
method cipher(kmd_, d_km, digraphs) public static
if d_.upper() = 'D' then d_ = -1 -- encode or decode adjustment
else d_ = +1
Line 298:
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
method encipher(km, digraphs) public static
return cipher(km, 'E', km, digraphs)
 
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
method decipher(km, digraphs) public static
return cipher(km, 'D', km, digraphs)
 
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Anonymous user