Jump to content

Module:Hash function

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by SilverLocust (talk | contribs) at 08:47, 29 July 2024 (Create module for mw.hash). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

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()
	return mw.dumpObject(mw.hash.listAlgorithms())
end

return p