Skip to content

Instantly share code, notes, and snippets.

@Equinox-
Equinox- / StringMasks.py
Last active October 6, 2015 04:18
Added support for back conversion.
#!/usr/bin/python
def stringToInt(name):
name=name[::-1]
val=0
offset=0
for char in name:
val = val + ((ord(char) & 0xff) << offset)
offset = offset + 8
return val