19 lines
505 B
Text
19 lines
505 B
Text
local crypto = require("crypto")
|
|
|
|
local strings = {
|
|
"",
|
|
"a",
|
|
"abc",
|
|
"message digest",
|
|
"abcdefghijklmnopqrstuvwxyz",
|
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
|
|
"12345678901234567890123456789012345678901234567890123456789012345678901234567890",
|
|
"The quick brown fox jumps over the lazy dog",
|
|
"The quick brown fox jumps over the lazy cog.",
|
|
"Rosetta Code"
|
|
}
|
|
|
|
for strings as s do
|
|
local hash = crypto.md5(s)
|
|
print($"{hash} <== '{s}'")
|
|
end
|