The ISAAC cipher: Difference between revisions
Content added Content deleted
m (→{{header|Lua}}) |
|||
Line 2,916: | Line 2,916: | ||
end |
end |
||
function main( |
function main() |
||
local msg = "a Top Secret secret"; |
local msg = "a Top Secret secret"; |
||
local key = "this is my secret key"; |
local key = "this is my secret key"; |
||
Line 2,935: | Line 2,935: | ||
modPlainText = vigenere(modCipherText, DECRYPT); |
modPlainText = vigenere(modCipherText, DECRYPT); |
||
-- Program output |
-- Program output |
||
⚫ | |||
if not noprint then |
|||
print("Key : " .. key); |
|||
print("XOR : " .. ascii2hex(xorCipherText)); |
|||
print("XOR dcr: " .. xorPlainText); |
|||
print("MOD : " .. ascii2hex(modCipherText)); |
|||
print("MOD dcr: " .. modPlainText); |
|||
⚫ | |||
end |
|||
end |
end |
||
main() |
|||
</lang> |
</lang> |
||
{{out}} |
{{out}} |