Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @classmethod
- def genarray (cls, string):
- int255 = []
- if cls.type:
- int10 = int(string, cls.type)
- while int10 > 255:
- int255.append(int10 % 255)
- int10 //= 255
- int255.append(int10)
- else:
- t = 0
- for char in string:
- t += ord(char)
- while t > 255:
- int255.append(t % 255)
- t //= 255
- int255.append(t)
- return int255
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement