Module:Hash
| This module is rated as deprecated and should no longer be used. |
Module documentationThis gives access to several hash functions through mw.hash. Usage[edit source]
Examples[edit source]
gives the follows: 11e60398
gives the follows: 730e109bd7a8a32b1cb9d9a09aa2325d2430587ddbc0c38bad911525 Algorithms[edit source]
|
require("strict")
local p = {}
function p.main(frame)
local algo = frame.args['algo'] or frame.args[1]
local value = frame.args['value'] or frame.args[2]
return mw.hash.hashValue( algo, value )
end
function p.list()
local list = {}
for i, v in ipairs(mw.hash.listAlgorithms()) do
list[i] = "<code>" .. v .. "</code>"
end
return table.concat(list, ",\n")
end
return p