Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function hash(msg,salt,bool)
- if not bool then
- for i = 1, 10 do
- msg = hash(msg,salt or "",true)
- end
- end
- local num = ""
- local salt = salt ~= nil and salt..msg or msg
- for i = 1, #salt do
- local let = salt:sub(i,i):byte()
- num = let <= 9 and num.."99"..let or let<=99 and num.."9"..let or num..let
- end
- math.randomseed(tonumber(num))
- local hashed = ""
- for i = 1, 250 do
- hashed = hashed..string.char(math.random(32,127))
- end
- return hashed
- end
- print(hash("hi","salt"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement