PappleFruit

Password V1.0 - Algorithm

Jul 27th, 2013
135
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. term.clear()
  2. term.setCursorPos(1,1)
  3.  
  4. print("Enter your password here:")
  5. pass = read("*")
  6.  
  7. local num  = ""
  8. local num3 = 0
  9. for char in pass:gmatch(".") do
  10.   num2 = (("0"):rep(3 - #tostring(string.byte(char))) .. string.byte(char))
  11.   num  = num .. num2
  12.   num3 = num3 + num2
  13. end
  14.  
  15. num = tonumber(num)
  16.  
  17. num = num + num3 - 12.64392709*num3
  18. num = num*2.78834729/0.97548326
  19.  
  20. num = tostring(num)
  21.  
  22. print(num)
RAW Paste Data