Advertisement
AbsoluteGamer

Seed2 Calculator (level upload)

Mar 15th, 2017
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. import hashlib,base64
  2.  
  3. def Sha1(text):
  4.     sha1 = hashlib.sha1()
  5.     sha1.update(text.encode())
  6.     return sha1.hexdigest()
  7.  
  8. def CharXor(text,keys):
  9.     res = ''
  10.     for i in range(len(text)):
  11.         res += chr(ord(text[i])^ord(keys[i%len(keys)]))
  12.     return res
  13.  
  14. def GetSeed2(lvlstr):
  15.     mix = ''
  16.     rep = len(lvlstr)//50
  17.     for i in range(50):
  18.         mix += (lvlstr[rep*i])
  19.     return base64.b64encode(CharXor(Sha1(mix+'xI25fpAapCQg'),'41274').encode()).decode()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement