-
Notifications
You must be signed in to change notification settings - Fork 1
Hashing Module
DizzasTeR edited this page Nov 3, 2020
·
1 revision
Provides cryptography utilities
- Hash.MD5(string input)
- Hash.SHA1(string input)
- Hash.SHA256(string input)
- Hash.SHA512(string input)
- Hash.Whirlpool(string input)
- Hash.KMAC256(string key, string input)
- Hash.SKEIN256(string key, string input)
- Hash.SKEIN512(string key, string input)
Event.bind("onServerInit", function()
local textToHash = "My Secret Text"
local hashes = {"MD5", "SHA1", "SHA256", "SHA512", "Whirlpool"}
for _, hashAlgo in pairs(hashes) do
print(hashAlgo..": "..Hash[hashAlgo](textToHash))
end
--
local key = "dizz"
print("KMAC256: "..Hash.KMAC256(key, textToHash))
print("SKEIN256: "..Hash.SKEIN256(key, textToHash))
print("SKEIN512: "..Hash.SKEIN512(key, textToHash))
end)