Release | String Hasher
#1
--[[

               This script was written by IcyJake
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       Please don't take credit for it as this is my script
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            Enjoy
--]]


local chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890+/"
function hash(s)
   local Len = #chars + 1
   local cur = #s % Len
   local toreturn = ""
   local toreturn2 = ""
   for Letter = 1, #s do
       cur = (cur + s:sub(Letter, Letter):byte()) % Len
       toreturn = toreturn .. chars:sub(cur, cur)
   end
   local seed = 0
   for i, v, r in toreturn:gmatch("(.)(.)(.)") do
       seed = seed + (i:byte() / v:byte()) * r:byte()
   end
   if #s < 3 then
       seed = 24e12
       for i = 1, #s do
           seed = seed / s:sub(i, i):byte()
       end
   end
   local to = ""
   math.randomseed(seed)
   for i = 1, 32 do
       local c = math.random(Len)
       to = to..chars:sub(c, c)
   end
   return to
end

messageToEncrypt = hash("IcyJake is cool") -- put the string you want to hash here

print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
print(messageToEncrypt)
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")

game.StarterGui:SetCore("SendNotification", {
   Title = "Encryption";
   Text = messageToEncrypt;
   Duration = 5;
   })
   
wait(5)

game.StarterGui:SetCore("SendNotification", {
   Title = "<3";
   Text = "Thanks for using String Hash made by IcyJake!";
   Duration = 5;
})

Credits to Josh for the syntax highlighting
  Reply
#2
Code:
print(string.rep("~", 140))
...?

Regardless, this is a nice tool so vouch for the contribution

EDIT: Just looked at how old this thread was sorry for the bump
  Reply




Users browsing this thread: 1 Guest(s)